• Advertisement
Sign in to follow this  

Scriptstdstring add-on under clang/LLVM 4.0 with libc++ and C++11

This topic is 2000 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I (finally) got our entire engine to compile - see more about the epic saga in my blog post Adventures in compiling for Mac OSX. However to do so, I had to patch one add-on. Turns out that under clang/LLVM, when using the libc++ standard library, the operator+= and empty() methods of std::basic_string are inlined. This causes the linker to be unable to find the declarations the add-on is attempting to register - they don't exist.

After digging around, I was able to create the attached patch. This has allowed for compilation on my systems: OSX 10.7 and 10.8 using XCode 4.3 and 4.4 respectively. I have not yet tested execution, as there's still many yards of code for me to write to get there.

Share this post


Link to post
Share on other sites
Advertisement
That's odd. It should be allowed to take the address of an inlined function. It will just force the compiler to provide a non-inlined version alongside the inlined one.

Anyway, I'll apply the patch as soon as possible.

Thanks,
Andreas

Share this post


Link to post
Share on other sites
I'm not 100% about the underlying cause. I did note that the std::basic_string::empty() method was marked for inlining, and I hypothesized off that. Beyond there.... All I'm 100% certain of is that providing wrapper functions cleared out the error. Someone with a far more extensive knowledge of the subject could dig deeper.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement