Issues building openNURBS on older Mac


I built openNURBS Apple LLVM version 7.0.2 (clang-700.1.81), which is the newest compiler packaged by Apple for my OS. (Mind you, it’s only three years old.)

Issues I had building:

  • opennurbs_unicode_cpsb is left out in the makefile, but seems to be needed. (I don’t see how this would have worked for any makefile-based build? But have only tried this one, so maybe I’m missing something.)

  • Bunch of NSXXX functions I don’t seem to have, none of which looked in any way essential?

  • Needed to define ON_CLANG_CONSTRUCTOR_BUG

  • Needed to change
    const ON_MeshNgonIterator ON_MeshNgonIterator::EmptyMeshNgonIterator;
    const ON_MeshNgonIterator ON_MeshNgonIterator::EmptyMeshNgonIterator ON_CLANG_CONSTRUCTOR_BUG_INIT(ON_MeshNgonIterator);

Ran into a separate set of issues trying to build on Linux, haven’t sorted those out yet.

(Dale Fugier) #3

Hi @colomon,

Make sure your compiler supports C++11, as requried by openNURBS 6.

– Dale


The Mac makefile actually sets the compiler flag to use C++14. My compiler (clang / LLVM 3.7 I believe) does support it, but has a bug in the implementation, namely the bug ON_CLANG_CONSTRUCTOR_BUG is intended to work around. Your code just missed one instance where the bug needs to be worked around. My suspicion is an earlier openNURBS 6 development version worked fine with the compiler I have, then whoever is working on it updated their compiler and never checked to see if newer code still worked with the older compiler.