cancel
Showing results for 
Search instead for 
Did you mean: 
EN
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Using std::string on Mac platforms

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.

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!