Hello,
I am implementing a NURBS “handler” with C++ on an Unix platform.
The aim is to read 3dm file and use the Splines as an input for a meshing program that works on Ubuntu.
Also, the C++ project in which I want to use openNURBS is based on a CMake compilation, with CMakeLists.txt files to configure it.
So the first step I did was to reorganize a little the folder of openNURBS in order to compile it with CMake into a dynamic library (openNURBSCore.so) :
opennurbs/
_CMakeLists.txt
_build/
_src/
___CMakeLists.txt
__opennurbs.cpp
__opennurbs.h
___zlib/
Once openNURBS complied, I linked the dynamic library to my main project (always with CMakeListst.txt), and everything compiled as well.
However, I cannot create a new object of openNURBS, because of a onmalloc issue :
For example, writing
ON::Begin();
ON_Brep* brep = new ON_Brep();
cause an error on the execution phase :
symbol lookup error: PATH/include/opennurbs_custom/build/lib/libopenNURBSCore.so: undefined symbol: onmalloc
But
ON::Begin();
ON_Brep* brep;
works well (but does nothing)
Have you any idea why this happens ? If necessary I can post my CMakeLists, but they are a little long to read because I included other libraries in my project.
Thanks in advance for your help !
Elisa