Jump to content

View more

Image of the Day

Adding some finishing touches...
Follow us for more
#screenshotsaturday #indiedev... by #MakeGoodGames https://t.co/Otbwywbm3a
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now
- - - - -

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

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
3 replies to this topic

#1 Ricky C.   Members   

132
Like
0Likes
Like

Posted 29 July 2012 - 04:51 PM

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.

Attached Files



#2 Andreas Jonsson   Moderators   

4652
Like
0Likes
Like

Posted 29 July 2012 - 07:17 PM

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
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

#3 Ricky C.   Members   

132
Like
0Likes
Like

Posted 29 July 2012 - 10:09 PM

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.

#4 Andreas Jonsson   Moderators   

4652
Like
0Likes
Like

Posted 30 July 2012 - 05:24 PM

Patch applied in revision 1378.

Thanks,
Andreas
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.