Installing and linking OpenNURBS with CMake on MacOS

Hello!

I have a C++ project built with CMake that I would like to build OpenNURBS functionality into. However, I am struggling to get the OpenNURBS library built and linked to the project. Has anyone been successful
1: building OpenNURBS in MacOS High Sierra
2: Linking the built library to a C++ project built with CMake

Any tips would help!

Thanks!

You should be able to build on MacOS with the provided makefile.

After that you should set up your CMake project file such that you point to the location where the headers and linking libraries are.

Or use the Xeode workspace that comes with the library.

Hello!

Thanks for the quick response! So when I attempt the make command, I end up with an error relating to NSFullUserName. It seems like the build isn’t finding the requisite apple libraries.

g++ -g -Wall -Wno-overloaded-virtual -Wno-switch -Wno-unknown-pragmas -Wno-unused-private-field -D_GNU_SOURCE -I. -std=c++14 -DON_COMPILING_OPENNURBS -I./freetype263/include -c opennurbs_3dm_attributes.cpp -o opennurbs_3dm_attributes.o
g++ -g -Wall -Wno-overloaded-virtual -Wno-switch -Wno-unknown-pragmas -Wno-unused-private-field -D_GNU_SOURCE -I. -std=c++14 -DON_COMPILING_OPENNURBS -I./freetype263/include -c opennurbs_3dm_properties.cpp -o opennurbs_3dm_properties.o
opennurbs_3dm_properties.cpp:158:21: error: use of undeclared identifier ‘NSFullUserName’
m_sLastEditedBy = NSFullUserName().UTF8String;
^
1 error generated.

Late to the party, but for others, the Xcode project and workspace build fine. Tested on MacOS 10.14 with Xcode 9.4.

Edit: The makefile build produced the NSFullUserName error.