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

OSX, Clang++, and getcwd

This topic is 2335 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

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

Share this post

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

  • Advertisement

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!