Jump to content
  • Advertisement
Sign in to follow this  
Ricky C.

OSX, Clang++, and getcwd

This topic is 2166 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've been working on getting the NLS Engine compiling and running under Mac OSX. After upgrading to Xcode 4.3, and configuring the project to use clang++ 3.1 as I found that Apple still hasn't upgraded g++ past 4.2, and we need the C++11 support, I found that there was a little problem hiding in the scriptbuilder add-on.

Everything was going well until scriptbuilder.cpp threw a compilation error: down on line 866 it complained that getcwd was an undeclared identifier. The fix was to just make sure that unistd.h was #included:

@@ -11,5 +11,5
#endif

-#if defined(AS_MARMALADE)
+#if defined(AS_MARMALADE) || defined(__APPLE__)
#include <unistd.h>
#endif

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!