Using std::string on Mac platforms
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā2014-06-04
01:55 AM
- last edited on
ā2023-08-01
02:53 PM
by
Doreena Deng
ā2014-06-04
01:55 AM
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?
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?
Labels:
- Labels:
-
Add-On (C++)
3 REPLIES 3
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā2014-06-04 09:13 AM
ā2014-06-04
09:13 AM
that depends on your compiler (xcode project preferences, check your compiler)

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā2014-06-04 10:01 AM
ā2014-06-04
10:01 AM
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
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
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā2014-06-04 04:59 PM
ā2014-06-04
04:59 PM
Many Thanks. It worked perfectly after I specified explicit non-recursive paths to the support module headers.
Thanks again for the quick response.
Thanks again for the quick response.