<p>Op 23 aug. 2011 02:22 schreef "Eli Friedman" <<a href="mailto:eli.friedman@gmail.com">eli.friedman@gmail.com</a>> het volgende:<br>
><br>
> On Mon, Aug 22, 2011 at 4:57 PM, Graham Wakefield<br>
> <<a href="mailto:wakefield@mat.ucsb.edu">wakefield@mat.ucsb.edu</a>> wrote:<br>
> > Hi list,<br>
> ><br>
> > I'm having an issue JIT compiling some C++ in an application I'm working on. JIT is failing with an llvm linker error on symbol _Znwj (the C++ new operator) on Windows, but works fine on OSX. As far as we can tell, this may be because the JIT is mangling new for the g++ standard library, but the host application is built using Visual Studio 2008 (aka VC9) which has a different mangled name for new.<br>

> ><br>
> > I was wondering if there are any configuration options we can use for Clang/LLVM to target MSVC runtime (for JITted code),<br>
><br>
> There is an option to use MSVC-compatible mangling, but it's<br>
> experimental, and you're likely to run into other C++ ABI issues.  I<br>
> wouldn't suggest doing this.<br>
><br>
> > or if anyone has any suggestions for strategies for embedding libg++ (the application will need to work on non-developer systems, so we can't rely on the presence of libraries on the system.)<br>
><br>
> You should be able to link against libstdc++.dll, distribute it with<br>
> your app, and have everything just work (although note that libstdc++<br>
> is LGPL).</p>
<p>I was under the impression that libstdc++ fell under GCC's runtime library exception, which pretty much means you can use it in any way you see fit (including statically linked)</p>
<p>Ruben</p>
<p>><br>
> Note that if you have RTTI and exceptions turned off, and are not<br>
> using standard library headers, you don't really need much besides<br>
> operator new/delete; it would be trivial to write your own<br>
> implementation.<br>
><br>
> -Eli<br>
><br>
> _______________________________________________<br>
> cfe-dev mailing list<br>
> <a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
</p>