We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

Archicad C++ API
About Archicad add-on development using the C++ API.

Using std::string on Mac platforms

Anonymous
Not applicable
Has anyone out there had any luck getting any of the API Example programs to compile under XCODE 5 using std:string ??

I have been able to compile the examples with no problem in their existing state. However, if I try to use a C++ std::string, the compiler complains that std::string is is not part of the _STL namespace.

#include <string>

std::string mystring = "ABC";

Works fine in windows. Any ideas on why std::string is not supported on the Mac?
3 REPLIES 3
Anonymous
Not applicable
that depends on your compiler (xcode project preferences, check your compiler)
Tibor Lorantfy
Graphisoft Alumni
Graphisoft Alumni
Hi Dave,

Please modify the USER_HEADER_SEARCH_PATHS in the Xcode project (either in the build settings, or by editing the .pbxproj file directly) to:

from something like:

USER_HEADER_SEARCH_PATHS = "../../Support/Inc ../../Support/Modules/**";

to something like:

USER_HEADER_SEARCH_PATHS = "../../Support/Inc ../../Support/Modules/GSRoot ../../Support/Modules/GSRoot/STL/imp ../../Support/Modules/GSUtils ../../Support/Modules/InputOutput ../../Support/Modules/Geometry";

The important parts here are the GSRoot and its subdirectories (add other modules as necessary).

Best Regards,
Tibor
Anonymous
Not applicable
Many Thanks. It worked perfectly after I specified explicit non-recursive paths to the support module headers.

Thanks again for the quick response.