<div dir="ltr"><div>Hello,</div><div><br></div>I am not a gmsh developer, but I suppose you could do something like this in your code:<div>namespace {</div><div>#include "gmsh.h"</div><div>}</div><div><br></div><div>Then your object file will have a copy of each function in its own anonymous namespace.</div><div><br></div><div>Regards,</div><div><br></div><div>Juan</div><div><br></div><div><br></div><div><br><div><br></div><div><br></div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Mar 12, 2019 at 12:58 PM Julien Hess <<a href="mailto:julien.hess.ch@gmail.com">julien.hess.ch@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
<p>Dear gmsh users,</p>
<p>I would like to use the C++ API of the Linux SDK (compiled with
GCC 4) in a program that I must compile with gcc-5.5.0.</p>
<p>Specifying "-D_GLIBCXX_USE_CXX11_ABI=0" is not an option, as the
program also uses several other libraries compiled with GCC 5 or
higher.</p>
<p>According to the `README.txt' in the SDK, another approach is to
rename `gmsh.h_cwrap' as `gmsh.h' in order to redefine the C++ API
in terms of the C API. If I do just that, the linker complains
about several "multiple-definition" errors, which come from the
fact that the functions in the `gmsh.h_cwrap' header are not <i>inline</i>d.</p>
<p>My temporary solution was to manually inline the 4 utility
functions and to "#define GMSH_API inline" for the rest of the API
functions. This does the trick, but I am pretty sure the gmsh
developers though of a cleaner solution. What is the proper way to
use this `gmsh.h_cwrap' header?</p>
<p>Thank you in advance for any advice, and many thanks and
congratulations to the gmsh team for the amazing work!</p>
<p>Cheers,</p>
<p>Julien<br>
</p>
</div>
_______________________________________________<br>
gmsh mailing list<br>
<a href="mailto:gmsh@onelab.info" target="_blank">gmsh@onelab.info</a><br>
<a href="http://onelab.info/mailman/listinfo/gmsh" rel="noreferrer" target="_blank">http://onelab.info/mailman/listinfo/gmsh</a><br>
</blockquote></div>