In NXOpen Linux batch, the following C++ code is causing a linker error:
std::string string = "test";
NXOpen::NXString nxstring = NXOpen::NXString(string);
nxstring_linux.cxx:(.text+0x81): undefined reference to `NXOpen::NXString::NXString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, NXOpen::NXString::NXStringMode)'
Or any other similar code that assigns a std::string to a NXOpen::NXString.
Solution
Set: #define _GLIBCXX_USE_CXX11_ABI 0 at the top of your code or as compiler define option.
This will disable specialized C++11 namespace: 'std::_cxx11'
This will resolve the linker error which is using, 'std' namespace
Notes and References
Hardware/Software Configuration
Platform: all
OS: n/a
OS Version: n/a
Product: NX
Application: SYSENG
Version: V1899
Function: NXOPEN
Ref: 001-9930365