ON_COMPILER_GNU support for OpenNURBs?

Hi, all:

Is there any support for ON_COMPILER_GNU under Linux ?

I see from opennurbs_defines.h, there is ONLY support for ON_COMPILER_MSC and ON_COMPILER_CLANG ?

#if defined(ON_COMPILER_MSC)
/* compiling OpenNurbs as a Windows DLL - export classes, functions, templates, and globals */
#define ON_CLASS __declspec(dllexport)
#define ON_DECL __declspec(dllexport)
#define ON_EXTERN_DECL __declspec(dllexport)
#define ON_DLL_TEMPLATE

#elif defined(ON_COMPILER_CLANG)
/* compiling opennurbs as an Apple shared library */
#define ON_CLASS attribute ((visibility (“default”)))
#define ON_DECL attribute ((visibility (“default”)))
#define ON_EXTERN_DECL attribute ((visibility (“default”)))

#else
error fill in your compiler dynamic linking decorations
#endif

Cheers
Pei

If you are looking to compile on Linux you may want to check this branch used for the rhino3dm modules:

https://github.com/mcneel/opennurbs/commits/sbaer/temp_fix_for_py

I checked this branch out this morning. It definitely appears like it’s working better, but it still gives the following error:

In file included from opennurbs.h:52:0,
from opennurbs_3dm_attributes.cpp:17:
opennurbs_lock.h:118:44: error: use of deleted function ‘std::atomic::atomic(const std::atomic&)’
std::atomic m_lock_value = ON_Lock::UnlockedValue;
^
In file included from opennurbs_system.h:594:0,
from opennurbs.h:29,
from opennurbs_3dm_attributes.cpp:17:
/usr/include/c++/5/atomic:612:7: note: declared here
atomic(const atomic&) = delete;
^
/usr/include/c++/5/atomic:616:17: note: after user-defined conversion: constexpr std::atomic::atomic(std::atomic::__integral_type)
constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { }

This compiles fine with GNU 7.3.0 (tested on my Linux Mint 18.3).

Could you tell more about your dev environment? GCC version, OS version…

I’m still on gcc 5.2.1 (Ubuntu), let me try updating a bit and see if it helps matters.

If updating to later GCC doesn’t work you could try modifying the source

```std::atomic m_lock_value = ON_Lock::UnlockedValue;``

should then become

std::atomic m_lock_value { ON_Lock::UnlockedValue };

And similarly for cases where the same error message happens. Let me know how that works.

Hmmm, yes. Updated to Ubuntu 18.04 and GCC 7.3.0, still get the same error. Guess I’ll try changing the code as you suggest next…

Latest issue:

opennurbs_statics.cpp:424:21: error: uninitialized const ‘ONX_ModelTest::Unset’ [-fpermissive]
const ONX_ModelTest ONX_ModelTest::Unset ON_CLANG_CONSTRUCTOR_BUG_INIT(ONX_ModelTest);
^~~~~~~~~~~~~
In file included from opennurbs.h:164:0,
from opennurbs_statics.cpp:1:
opennurbs_extensions.h:1631:16: note: ‘const class ONX_ModelTest’ has no user-provided default constructor
class ON_CLASS ONX_ModelTest
^~~~~~~~~~~~~
opennurbs_extensions.h:1634:3: note: constructor is not user-provided because it is explicitly defaulted in the class body
ONX_ModelTest() = default;
^~~~~~~~~~~~~
opennurbs_extensions.h:2037:43: note: and the implicitly-defined constructor does not initialize ‘unsigned int ONX_ModelTest::m_model_3dm_file_version [3]’
unsigned int m_model_3dm_file_version[3];

Now trying

#define ON_CLANG_CONSTRUCTOR_BUG

(edited to add) That worked, now the only issue seems to be missing uuid_generate, and that one I’ve solved before, even if I don’t quite remember how.

Hello everyone… Thank you for your kind reply…

Currently, I’m working on Ubuntu 19.04, which comes with gcc/g++ 8.3.0 and clang version 8.0.0-3.

A part of pull requests are at https://github.com/mcneel/opennurbs/pull/8 .

I still have some questions:

  1. qsort
opennurbs_sort.cpp:69:3: error: no matching function for call to 'qsort_r'
qsort_r(base,nel,width,context,compar);
  1. printf/scanf

such as:

opennurbs_string_format.cpp:813:13: error: no matching function for call to ‘vsnprintf’
opennurbs_string_scan.cpp:159:10: error: use of undeclared identifier ‘swscanf_l’

opennurbs_string_scan.cpp:164:10: error: ‘_vswscanf_s_l’ was not declared in this scope
return _vswscanf_s_l(buffer, format, ON_Locale::InvariantCulture.NumericLocalePtr(), args);

etc.

It seems opennurbs does NOT support GNU LINUX well?

Cheers
Pei

I’ve used and tested OpenNURBS with Clang on Linux Mint 18. This works great for my import_3dm blender add-on using rhino3dm. This is the Python and JavaScript wrapper around OpenNURBS. It works great on Linux as well, using the Clang compiler. You’ll find there is a branch with some fixes that make it all compile on Linux - see the lib folder in rhino3dm

Don’t delete the freetype and zlib source code - those are used on other platforms. I also think the preference is that we use the source code we bundle with OpenNURBS for increased control over those libs, in case bugs need to be fixed then and there.

Hi, Thank you very much Nathan:

I checked out the Linux modification and built with Clang 8.0.0-3 under Ubuntu 19.04, however, I still obtained the following ERROR messages:

In file included from opennurbs_3dm_attributes.cpp:17:
In file included from ./opennurbs.h:29:
In file included from ./opennurbs_system.h:115:
./opennurbs_system_runtime.h:82:2: error: unterminated conditional directive
#if defined(ON_RUNTIME_APPLE)
^
In file included from opennurbs_3dm_attributes.cpp:17:
In file included from ./opennurbs.h:29:
./opennurbs_system.h:244:2: error: Update OpenNURBS to work with new pointer size.
error Update OpenNURBS to work with new pointer size.
^
In file included from opennurbs_3dm_properties.cpp:17:
In file included from ./opennurbs.h:29:
In file included from ./opennurbs_system.h:115:
./opennurbs_system_runtime.h:82:2: error: unterminated conditional directive
#if defined(ON_RUNTIME_APPLE)
^
In file included from opennurbs_3dm_properties.cpp:17:
In file included from ./opennurbs.h:29:
./opennurbs_system.h:244:2: error: Update OpenNURBS to work with new pointer size.
error Update OpenNURBS to work with new pointer size.
^
In file included from opennurbs_annotationbase.cpp:17:
In file included from ./opennurbs.h:29:
In file included from ./opennurbs_system.h:115:
./opennurbs_system_runtime.h:82:2: error: unterminated conditional directive
#if defined(ON_RUNTIME_APPLE)
^
In file included from opennurbs_annotationbase.cpp:17:
In file included from ./opennurbs.h:29:
./opennurbs_system.h:244:2: error: Update OpenNURBS to work with new pointer size.
error Update OpenNURBS to work with new pointer size.
^
In file included from opennurbs_archive.cpp:17:
In file included from ./opennurbs.h:29:
In file included from ./opennurbs_system.h:115:
./opennurbs_system_runtime.h:82:2: error: unterminated conditional directive
#if defined(ON_RUNTIME_APPLE)
^
In file included from opennurbs_archive.cpp:17:
In file included from ./opennurbs.h:29:
./opennurbs_system.h:244:2: error: Update OpenNURBS to work with new pointer size.
error Update OpenNURBS to work with new pointer size.
^
In file included from opennurbs_arccurve.cpp:17:
In file included from ./opennurbs.h:29:
In file included from ./opennurbs_system.h:115:
./opennurbs_system_runtime.h:82:2: error: unterminated conditional directive
#if defined(ON_RUNTIME_APPLE)
^
In file included from opennurbs_arccurve.cpp:17:
In file included from ./opennurbs.h:29:
./opennurbs_system.h:244:2: error: Update OpenNURBS to work with new pointer size.
error Update OpenNURBS to work with new pointer size.
^
In file included from opennurbs_archive_manifest.cpp:17:
In file included from ./opennurbs.h:29:
In file included from ./opennurbs_system.h:115:
./opennurbs_system_runtime.h:82:2: error: unterminated conditional directive
#if defined(ON_RUNTIME_APPLE)
^
In file included from opennurbs_archive_manifest.cpp:17:
In file included from ./opennurbs.h:29:
./opennurbs_system.h:244:2: error: Update OpenNURBS to work with new pointer size.
error Update OpenNURBS to work with new pointer size.
^
In file included from opennurbs_arc.cpp:17:
In file included from ./opennurbs.h:29:
In file included from ./opennurbs_system.h:115:
./opennurbs_system_runtime.h:82:2: error: unterminated conditional directive
#if defined(ON_RUNTIME_APPLE)
^
In file included from opennurbs_arc.cpp:17:
In file included from ./opennurbs.h:29:
./opennurbs_system.h:244:2: error: Update OpenNURBS to work with new pointer size.
error Update OpenNURBS to work with new pointer size.
^
In file included from opennurbs_3dm_settings.cpp:17:
In file included from ./opennurbs.h:29:
In file included from ./opennurbs_system.h:115:
./opennurbs_system_runtime.h:82:2: error: unterminated conditional directive
#if defined(ON_RUNTIME_APPLE)
^
In file included from opennurbs_3dm_settings.cpp:17:
In file included from ./opennurbs.h:29:
./opennurbs_system.h:244:2: error: Update OpenNURBS to work with new pointer size.
error Update OpenNURBS to work with new pointer size.
^
./opennurbs_system.h:716:2: error: Either ON_64BIT_RUNTIME or ON_32BIT_RUNTIME must be defined.
error Either ON_64BIT_RUNTIME or ON_32BIT_RUNTIME must be defined.
^
./opennurbs_system.h:743:2: error: OpenNURBS assumes sizeof(void*) is 4 or 8 bytes
error OpenNURBS assumes sizeof(void*) is 4 or 8 bytes
^
./opennurbs_system.h:716:2: error: Either ON_64BIT_RUNTIME or ON_32BIT_RUNTIME must be defined.
error Either ON_64BIT_RUNTIME or ON_32BIT_RUNTIME must be defined.
^
./opennurbs_system.h:743:2: error: OpenNURBS assumes sizeof(void*) is 4 or 8 bytes
error OpenNURBS assumes sizeof(void*) is 4 or 8 bytes
^
In file included from opennurbs_archive.cpp:17:
In file included from ./opennurbs.h:35:
./opennurbs_defines.h:335:25: error: unknown type name ‘ON__UINT_PTR’
bool ON_IsNullPtr(const ON__UINT_PTR ptr);
^
./opennurbs_defines.h:338:25: error: unknown type name ‘ON__INT_PTR’
bool ON_IsNullPtr(const ON__INT_PTR ptr);
^
./opennurbs_system.h:716:2: error: Either ON_64BIT_RUNTIME or ON_32BIT_RUNTIME must be defined.
error Either ON_64BIT_RUNTIME or ON_32BIT_RUNTIME must be defined.
^
./opennurbs_system.h:743:2: error: OpenNURBS assumes sizeof(void*) is 4 or 8 bytes
error OpenNURBS assumes sizeof(void*) is 4 or 8 bytes
^
In file included from opennurbs_annotationbase.cpp:17:
In file included from ./opennurbs.h:35:
./opennurbs_defines.h:335:25: error: unknown type name ‘ON__UINT_PTR’
bool ON_IsNullPtr(const ON__UINT_PTR ptr);
^
./opennurbs_defines.h:338:25: error: unknown type name ‘ON__INT_PTR’
bool ON_IsNullPtr(const ON__INT_PTR ptr);
^
./opennurbs_defines.h:1237:5: error: unknown type name ‘ON__UINT_PTR’
ON__UINT_PTR model_serial_number
^
In file included from opennurbs_3dm_attributes.cpp:17:
In file included from ./opennurbs.h:35:
./opennurbs_defines.h:335:25: error: unknown type name ‘ON__UINT_PTR’
bool ON_IsNullPtr(const ON__UINT_PTR ptr);
^
./opennurbs_system.h:716:2: error: Either ON_64BIT_RUNTIME or ON_32BIT_RUNTIME must be defined.
error Either ON_64BIT_RUNTIME or ON_32BIT_RUNTIME must be defined.
^
./opennurbs_system.h:743:2: error: OpenNURBS assumes sizeof(void*) is 4 or 8 bytes
error OpenNURBS assumes sizeof(void*) is 4 or 8 bytes
^
./opennurbs_defines.h:338:25: error: unknown type name ‘ON__INT_PTR’
bool ON_IsNullPtr(const ON__INT_PTR ptr);
^
./opennurbs_defines.h:1242:64: error: unknown type name ‘ON__UINT_PTR’
ON::LengthUnitSystem (func_ModelLengthUnitSystemCallback)(ON__UINT_PTR)
^
./opennurbs_defines.h:1237:5: error: ./opennurbs_system.h:716:2: error: Either ON_64BIT_RUNTIME or ON_32BIT_RUNTIME must be defined.
error Either ON_64BIT_RUNTIME or ON_32BIT_RUNTIME must be defined.unknown
^
./opennurbs_system.h:743:2: error: OpenNURBS assumes sizeof(void
) is 4 or 8 bytes
type name#error OpenNURBS assumes sizeof(void*) is 4 or 8 bytes
^
‘ON__UINT_PTR’
ON__UINT_PTR model_serial_number
^
In file included from opennurbs_archive_manifest.cpp:17:
In file included from ./opennurbs.h:35:
./opennurbs_defines.h:335:25: error: unknown type name ‘ON__UINT_PTR’
bool ON_IsNullPtr(const ON__UINT_PTR ptr);
^
./opennurbs_defines.h:1237:5: error: unknown type name ‘ON__UINT_PTR’
ON__UINT_PTR model_serial_number
^
./opennurbs_defines.h:338:25: error: unknown type name ‘ON__INT_PTR’
bool ON_IsNullPtr(const ON__INT_PTR ptr);
^
./opennurbs_defines.h:1242:64: error: unknown type name ‘ON__UINT_PTR’
ON::LengthUnitSystem (func_ModelLengthUnitSystemCallback)(ON__UINT_PTR)
^
./opennurbs_system.h:716:2: error: Either ON_64BIT_RUNTIME or ON_32BIT_RUNTIME must be defined.
error Either ON_64BIT_RUNTIME or ON_32BIT_RUNTIME must be defined.
^
./opennurbs_system.h:743:2: error: OpenNURBS assumes sizeof(void
) is 4 or 8 bytes
error OpenNURBS assumes sizeof(void*) is 4 or 8 bytes
^
./opennurbs_defines.h:1242:64: error: unknown type name ‘ON__UINT_PTR’
ON::LengthUnitSystem (func_ModelLengthUnitSystemCallback)(ON__UINT_PTR)
^
In file included from opennurbs_archive.cpp:17:
In file included from ./opennurbs.h:40:
./opennurbs_uuid.h:382:3: error: unknown type name ‘ON__UINT_PTR’
ON__UINT_PTR m_ptr = 0;
^
./opennurbs_defines.h:1237:5: error: unknown type name ‘ON__UINT_PTR’
ON__UINT_PTR model_serial_number
^
In file included from opennurbs_3dm_properties.cpp:17:
In file included from ./opennurbs.h:35:
./opennurbs_defines.h:335:25: error: unknown type name ‘ON__UINT_PTR’
bool ON_IsNullPtr(const ON__UINT_PTR ptr);
^
In file included from opennurbs_arccurve.cpp:17:
In file included from ./opennurbs.h:35:
./opennurbs_defines.h:335:25: error: unknown type name ‘ON__UINT_PTR’
bool ON_IsNullPtr(const ON__UINT_PTR ptr);
^
./opennurbs_defines.h:338:25: error: unknown type name ‘ON__INT_PTR’
bool ON_IsNullPtr(const ON__INT_PTR ptr);
^
./opennurbs_defines.h:1242:64: error: unknown type name ‘ON__UINT_PTR’
ON::LengthUnitSystem (func_ModelLengthUnitSystemCallback)(ON__UINT_PTR)
^
./opennurbs_defines.h:338:25: error: In file included from unknown type opennurbs_annotationbase.cppname :'ON__INT_PTR’17:
In file included from
./opennurbs.h:40:
bool ON_IsNullPtr(const ON__INT_PTR ptr);./opennurbs_uuid.h:
382: ^
3: error: unknown type name ‘ON__UINT_PTR’
ON__UINT_PTR m_ptr = 0;
^
In file included from opennurbs_archive.cpp:17:
In file included from ./opennurbs.h:47:
./opennurbs_locale.h:28:3: error: unknown type name ‘ON__UINT_PTR’
ON__UINT_PTR
^
In file included from opennurbs_3dm_attributes.cpp:17:
In file included from ./opennurbs.h:40:
./opennurbs_uuid.h:382:3: error: unknown type name ‘ON__UINT_PTR’
ON__UINT_PTR m_ptr = 0;
^
./opennurbs_system.h:716:2: error: Either ON_64BIT_RUNTIME or ON_32BIT_RUNTIME must be defined.
error Either ON_64BIT_RUNTIME or ON_32BIT_RUNTIME must be defined.
^
./opennurbs_system.h:743:2: error: OpenNURBS assumes sizeof(void
) is 4 or 8 bytes
error OpenNURBS assumes sizeof(void
) is 4 or 8 bytes
^
./opennurbs_defines.h:1237:5: error: unknown type name ‘ON__UINT_PTR’
ON__UINT_PTR model_serial_number
^
./opennurbs_defines.h:1237:5: error: unknown type name ‘ON__UINT_PTR’
ON__UINT_PTR model_serial_number
^
In file included from opennurbs_annotationbase.cpp:17:
In file included from ./opennurbs.h:47:
./opennurbs_locale.h:28:3: error: unknown type name ‘ON__UINT_PTR’
ON__UINT_PTR
^
In file included from opennurbs_archive.cpp:17:
In file included from ./opennurbs.h:50:
./opennurbs_compstat.h:648:15: error: unknown type name ‘ON__UINT_PTR’
bool InList(ON__UINT_PTR x) const;
^
In file included from opennurbs_archive_manifest.cpp:17:
In file included from ./opennurbs.h:40:
./opennurbs_uuid.h:382:3: error: unknown type name ‘ON__UINT_PTR’
ON__UINT_PTR m_ptr = 0;
^
In file included from opennurbs_3dm_attributes.cpp:17:
In file included from ./opennurbs.h:47:
./opennurbs_locale.h:28:3: error: unknown type name ‘ON__UINT_PTR’
ON__UINT_PTR
^
In file included from opennurbs_3dm_settings.cpp:17:
In file included from ./opennurbs.h:35:
./opennurbs_defines.h:335:25: error: unknown type name ‘ON__UINT_PTR’
bool ON_IsNullPtr(const ON__UINT_PTR ptr);
^./opennurbs_defines.h:1242:64: error: unknown type name ‘ON__UINT_PTR’
ON::LengthUnitSystem (*func_ModelLengthUnitSystemCallback)(ON__UINT_PTR)
^

./opennurbs_defines.h:1242:64: error: unknown type name ‘ON__UINT_PTR’
ON::LengthUnitSystem (func_ModelLengthUnitSystemCallback)(ON__UINT_PTR)
^
./opennurbs_compstat.h:656:18: error: unknown type name ‘ON__UINT_PTR’
bool AddToList(ON__UINT_PTR x);
^
In file included from opennurbs_annotationbase.cpp:17:
In file included from ./opennurbs.h:50:
./opennurbs_compstat.h:648:15: error: unknown type name ‘ON__UINT_PTR’
bool InList(ON__UINT_PTR x) const;
^
In file included from opennurbs_archive_manifest.cpp:17:
In file included from ./opennurbs.h:47:
./opennurbs_locale.h:28:3: error: unknown type name ‘ON__UINT_PTR’
ON__UINT_PTR
^
In file included from opennurbs_3dm_attributes.cpp:17:
In file included from ./opennurbs.h:50:
./opennurbs_compstat.h:648:15: error: unknown type name ‘ON__UINT_PTR’
bool InList(ON__UINT_PTR x) const;
^
./opennurbs_defines.h:338:25: error: unknown type name ‘ON__INT_PTR’
bool ON_IsNullPtr(const ON__INT_PTR ptr);
^
./opennurbs_compstat.h:672:27: error: unknown type name ‘ON__UINT_PTR’
void ExpertAddNewToList(ON__UINT_PTR x);
^
In file included from opennurbs_3dm_properties.cpp:17:
In file included from ./opennurbs.h:40:
./opennurbs_uuid.h:382:3: error: unknown type name ‘ON__UINT_PTR’
./opennurbs_compstat.h ON__UINT_PTR m_ptr = 0;
^
:656:18: error: unknown type name ‘ON__UINT_PTR’
bool AddToList(ON__UINT_PTR x);
^
In file included from opennurbs_arccurve.cpp:17:
In file included from ./opennurbs.h:40:
./opennurbs_uuid.h:382:3: error: unknown type name ‘ON__UINT_PTR’
ON__UINT_PTR m_ptr = 0;
^
./opennurbs_compstat.h:656:18: error: unknown type name ‘ON__UINT_PTR’
bool AddToList(ON__UINT_PTR x);
^
In file included from opennurbs_archive_manifest.cpp:17:
In file included from ./opennurbs.h:50:
./opennurbs_compstat.h:648:15: error: unknown type name ‘ON__UINT_PTR’
bool InList(ON__UINT_PTR x) const;
^
./opennurbs_defines.h:1237:5: error: unknown type name ‘ON__UINT_PTR’
ON__UINT_PTR model_serial_number
^
./opennurbs_compstat.h:684:5: error: unknown type name ‘ON__UINT_PTR’
ON__UINT_PTR
m_a = nullptr;
^
./opennurbs_compstat.h:672:27: error: unknown type name ‘ON__UINT_PTR’
void ExpertAddNewToList(ON__UINT_PTR x);
^
In file included from opennurbs_3dm_properties.cpp:17:
In file included from ./opennurbs.h:47:
./opennurbs_locale.h:28:3: error: unknown type name ‘ON__UINT_PTR’
ON__UINT_PTR
^
In file included from opennurbs_arccurve.cpp:17:
In file included from ./opennurbs.h:47:
./opennurbs_locale.h:28:3: error: unknown type name ‘ON__UINT_PTR’
ON__UINT_PTR
^
./opennurbs_compstat.h:672:27:./opennurbs_compstat.h :656:error18: : unknown errortype: name ‘ON__UINT_PTR’
unknown type name void ExpertAddNewToList(ON__UINT_PTR x);
‘ON__UINT_PTR’ ^

bool AddToList(ON__UINT_PTR x);
^
./opennurbs_defines.h:1242:64: error: unknown type name ‘ON__UINT_PTR’
./opennurbs_compstat.h:686:38: error: unknown type name ‘ON__UINT_PTR’
bool InBlock(size_t sorted_count,ON__UINT_PTR p) const;
^
ON::LengthUnitSystem (func_ModelLengthUnitSystemCallback)(ON__UINT_PTR)
^
./opennurbs_compstat.h:684:5: error: unknown type name ‘ON__UINT_PTR’
ON__UINT_PTR
m_a = nullptr;
^
./opennurbs_compstat.h:684:5: error: unknown type name ‘ON__UINT_PTR’
ON__UINT_PTR* m_a = nullptr;
^
./opennurbs_compstat.h./opennurbs_compstat.h::691672:24:: 27error: error: : unknown typeunknown nametype ‘ON__UINT_PTR’
name ‘ON__UINT_PTR’
void ExpertAddNewToList(ON__UINT_PTR x);
^
static int Compare(ON__UINT_PTR* lhs, ON__UINT_PTR* rhs);
^
In file included from opennurbs_arccurve.cpp:17:
In file included from ./opennurbs.h:50:
./opennurbs_compstat.h:648:15: error: unknown type name ‘ON__UINT_PTR’
bool InList(ON__UINT_PTR x) const;
^
In file included from opennurbs_3dm_properties.cpp:17:
In file included from ./opennurbs.h:50:
./opennurbs_compstat.h:648:15: error: unknown type name ‘ON__UINT_PTR’
bool InList(ON__UINT_PTR x) const;
^
./opennurbs_compstat.h:686:38: error: unknown type name ‘ON__UINT_PTR’
bool InBlock(size_t sorted_count,ON__UINT_PTR p) const;
^
./opennurbs_compstat.h:686:38: error: unknown type name ‘ON__UINT_PTR’
bool InBlock(size_t sorted_count,ON__UINT_PTR p) const;
^
./opennurbs_compstat.h:684:5: error: unknown type name ./opennurbs_compstat.h’ON__UINT_PTR’
:691:43: ON__UINT_PTR* m_a = nullptr;
^
error: unknown type name ‘ON__UINT_PTR’
static int Compare(ON__UINT_PTR* lhs, ON__UINT_PTR* rhs);
^
./opennurbs_compstat.h:656:18: error: unknown type name ‘ON__UINT_PTR’
bool AddToList(ON__UINT_PTR x);
^
./opennurbs_compstat.h:656:18: error: unknown type name ‘ON__UINT_PTR’
bool AddToList(ON__UINT_PTR x);
^
./opennurbs_compstat.h:691:24: error: unknown type name ‘ON__UINT_PTR’
static int Compare(ON__UINT_PTR* lhs, ON__UINT_PTR* rhs);
^
In file included from opennurbs_3dm_settings.cpp:17:
In file included from ./opennurbs.h:40:
./opennurbs_uuid.h:382:3: error: unknown type name ‘ON__UINT_PTR’
ON__UINT_PTR m_ptr = 0;
^
./opennurbs_compstat.h:691:24: error: unknown type name ‘ON__UINT_PTR’
static int Compare(ON__UINT_PTR* lhs, ON__UINT_PTR* rhs);
^
./opennurbs_compstat.h:686:38: error: unknown type name ‘ON__UINT_PTR’
bool InBlock(size_t sorted_count,ON__UINT_PTR p) const;
./opennurbs_compstat.h: ^672
:27: error: unknown type name ‘ON__UINT_PTR’
void ExpertAddNewToList(ON__UINT_PTR x);
^
./opennurbs_compstat.h:704:26: error: unknown type name ‘ON__UINT_PTR’
void Internal_AddValue(ON__UINT_PTR x);
^
./opennurbs_compstat.h:672:27: error: unknown type name ‘ON__UINT_PTR’
void ExpertAddNewToList(ON__UINT_PTR x);
^
./opennurbs_compstat.h:691:43: error: unknown type name ‘ON__UINT_PTR’
static int Compare(ON__UINT_PTR* lhs, ON__UINT_PTR* rhs);
^
./opennurbs_compstat.h:691:43: error: unknown type name ‘ON__UINT_PTR’
static int Compare(ON__UINT_PTR* lhs, ON__UINT_PTR* rhs);
^
./opennurbs_compstat.h:691:24: error: unknown type name ‘ON__UINT_PTR’
static int Compare(ON__UINT_PTR* lhs, ON__UINT_PTR* rhs);
^
In file included from opennurbs_3dm_settings.cpp:17:
In file included from ./opennurbs.h:47:
./opennurbs_locale.h:28:3:./opennurbs_compstat.h:684:5: error: unknown type name ‘ON__UINT_PTR’
ON__UINT_PTR* m_a = nullptr;
^
error: unknown type name ‘ON__UINT_PTR’
ON__UINT_PTR
^
./opennurbs_compstat.h:684:5: error: unknown type name ‘ON__UINT_PTR’
ON__UINT_PTR* m_a = nullptr;
^
In file included from opennurbs_archive.cpp:17:
In file included from ./opennurbs.h:51:
./opennurbs_progress_reporter.h:85:31: error: unknown type name ./opennurbs_compstat.h:704:26: ‘ON__UINT_PTR’
error: unknown type name ‘ON__UINT_PTR’
void (*callback_function)(ON__UINT_PTR context,double fraction_complete), void Internal_AddValue(ON__UINT_PTR x);

                     ^
                          ^

./opennurbs_compstat.h:704:26: error: unknown type name ‘ON__UINT_PTR’
void Internal_AddValue(ON__UINT_PTR x);
^
./opennurbs_compstat.h:691:43: error: unknown type name ‘ON__UINT_PTR’
static int Compare(ON__UINT_PTR* lhs, ON__UINT_PTR* rhs);
^
./opennurbs_compstat.h:686:38: error: unknown type name ‘ON__UINT_PTR’
bool InBlock(size_t sorted_count,ON__UINT_PTR p) const;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
./opennurbs_compstat.h:686:38: error: unknown type name ‘ON__UINT_PTR’
bool InBlock(size_t sorted_count,ON__UINT_PTR p) const;
^
In file included from opennurbs_annotationbase.cpp:17:
In file included from ./opennurbs.h:51:
./opennurbs_progress_reporter.h:85:31: error: unknown type name ‘ON__UINT_PTR’
void (callback_function)(ON__UINT_PTR context,double fraction_complete),
^
In file included from opennurbs_3dm_attributes.cpp:17:
In file included from ./opennurbs.h:51:
./opennurbs_progress_reporter.h:85:31: error: unknown type name ‘ON__UINT_PTR’
void (callback_function)(ON__UINT_PTR context,double fraction_complete),
^
./opennurbs_compstat.h:704:26: error: unknown type name ‘ON__UINT_PTR’
void Internal_AddValue(ON__UINT_PTR x);
^
./opennurbs_system.h:716:2: error: Either ON_64BIT_RUNTIME or ON_32BIT_RUNTIME must be defined.
error Either ON_64BIT_RUNTIME or ON_32BIT_RUNTIME must be defined.
^
./opennurbs_system.h:743:2: error: OpenNURBS assumes sizeof(void
) is 4 or 8 bytes
error OpenNURBS assumes sizeof(void
) is 4 or 8 bytes
^
./opennurbs_compstat.h:691:24: error: unknown type name ‘ON__UINT_PTR’
static int Compare(ON__UINT_PTR* lhs, ON__UINT_PTR* rhs);
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
In file included from opennurbs_3dm_settings.cpp:17:
In file included from ./opennurbs.h:50:
./opennurbs_compstat.h:648:15: error: unknown type name ‘ON__UINT_PTR’
bool InList(ON__UINT_PTR x) const;
^
./opennurbs_compstat.h:691:24: error: unknown type name ‘ON__UINT_PTR’
static int Compare(ON__UINT_PTR* lhs, ON__UINT_PTR* rhs);
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
In file included from opennurbs_archive_manifest.cpp:17:
In file included from ./opennurbs.h:51:
./opennurbs_progress_reporter.h:85:31: error: unknown type name ‘ON__UINT_PTR’
void (callback_function)(ON__UINT_PTR context,double fraction_complete),
^
./opennurbs_compstat.h:691:43: error: unknown type name ‘ON__UINT_PTR’
static int Compare(ON__UINT_PTR
lhs, ON__UINT_PTR* rhs);
^
In file included from opennurbs_arc.cpp:17:
In file included from ./opennurbs.h:35:
./opennurbs_defines.h:335:25: error: unknown type name ‘ON__UINT_PTR’
bool ON_IsNullPtr(const ON__UINT_PTR ptr);
^
./opennurbs_compstat.h:656:18: error: unknown type name ‘ON__UINT_PTR’
bool AddToList(ON__UINT_PTR x);
^
./opennurbs_defines.h:338:25: error: unknown type name ‘ON__INT_PTR’
bool ON_IsNullPtr(const ON__INT_PTR ptr);
^
./opennurbs_compstat.h:691:43: error: unknown type name ‘ON__UINT_PTR’
static int Compare(ON__UINT_PTR* lhs, ON__UINT_PTR* rhs);
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
./opennurbs_compstat.h:704:26: error: unknown type name ‘ON__UINT_PTR’
void Internal_AddValue(ON__UINT_PTR x);
^
./opennurbs_compstat.h:672:27: error: unknown type name ‘ON__UINT_PTR’
void ExpertAddNewToList(ON__UINT_PTR x);
^
./opennurbs_compstat.h:704:26: error: unknown type name ‘ON__UINT_PTR’
void Internal_AddValue(ON__UINT_PTR x);
^
./opennurbs_defines.h:1237:5: error: unknown type name ‘ON__UINT_PTR’
ON__UINT_PTR model_serial_number
^
In file included from opennurbs_3dm_properties.cpp:17:
In file included from ./opennurbs.h:51:
./opennurbs_progress_reporter.h:85:31: error: unknown type name ‘ON__UINT_PTR’
void (callback_function)(ON__UINT_PTR context,double fraction_complete),
^
In file included from opennurbs_arccurve.cpp:17:
In file included from ./opennurbs.h:51:
./opennurbs_progress_reporter.h:85:31: error: unknown type name ‘ON__UINT_PTR’
void (callback_function)(ON__UINT_PTR context,double fraction_complete),
^
./opennurbs_defines.h:1242:64: error: unknown type name ‘ON__UINT_PTR’
ON::LengthUnitSystem (func_ModelLengthUnitSystemCallback)(ON__UINT_PTR)
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
./opennurbs_compstat.h:684:5: error: unknown type name ‘ON__UINT_PTR’
ON__UINT_PTR
m_a = nullptr;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
./opennurbs_compstat.h:686:38: error: unknown type name ‘ON__UINT_PTR’
bool InBlock(size_t sorted_count,ON__UINT_PTR p) const;
^
./opennurbs_compstat.h:691:24: error: unknown type name ‘ON__UINT_PTR’
static int Compare(ON__UINT_PTR
lhs, ON__UINT_PTR
rhs);
^
In file included from opennurbs_arc.cpp:17:
In file included from ./opennurbs.h:40:
./opennurbs_uuid.h:382:3: error: unknown type name ‘ON__UINT_PTR’
ON__UINT_PTR m_ptr = 0;
^
./opennurbs_compstat.h:691:43: error: unknown type name ‘ON__UINT_PTR’
static int Compare(ON__UINT_PTR* lhs, ON__UINT_PTR* rhs);
^
In file included from opennurbs_arc.cpp:17:
In file included from ./opennurbs.h:47:
./opennurbs_locale.h:28:3: error: unknown type name ‘ON__UINT_PTR’
ON__UINT_PTR
^
./opennurbs_compstat.h:704:26: error: unknown type name ‘ON__UINT_PTR’
void Internal_AddValue(ON__UINT_PTR x);
^
In file included from opennurbs_3dm_settings.cpp:17:
In file included from ./opennurbs.h:51:
./opennurbs_progress_reporter.h:85:31: error: unknown type name ‘ON__UINT_PTR’
void (callback_function)(ON__UINT_PTR context,double fraction_complete),
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
In file included from opennurbs_arc.cpp:17:
In file included from ./opennurbs.h:50:
./opennurbs_compstat.h:648:15: error: unknown type name ‘ON__UINT_PTR’
bool InList(ON__UINT_PTR x) const;
^
./opennurbs_compstat.h:656:18: error: unknown type name ‘ON__UINT_PTR’
bool AddToList(ON__UINT_PTR x);
^
./opennurbs_compstat.h:672:27: error: unknown type name ‘ON__UINT_PTR’
void ExpertAddNewToList(ON__UINT_PTR x);
^
./opennurbs_compstat.h:684:5: error: unknown type name ‘ON__UINT_PTR’
ON__UINT_PTR
m_a = nullptr;
^
./opennurbs_compstat.h:686:38: error: unknown type name ‘ON__UINT_PTR’
bool InBlock(size_t sorted_count,ON__UINT_PTR p) const;
^
./opennurbs_compstat.h:691:24: error: unknown type name ‘ON__UINT_PTR’
static int Compare(ON__UINT_PTR* lhs, ON__UINT_PTR* rhs);
^
./opennurbs_compstat.h:691:43: error: unknown type name ‘ON__UINT_PTR’
static int Compare(ON__UINT_PTR* lhs, ON__UINT_PTR* rhs);
^
./opennurbs_compstat.h:704:26: error: unknown type name ‘ON__UINT_PTR’
void Internal_AddValue(ON__UINT_PTR x);
^
In file included from opennurbs_arc.cpp:17:
In file included from ./opennurbs.h:51:
./opennurbs_progress_reporter.h:85:31: error: unknown type name ‘ON__UINT_PTR’
void (*callback_function)(ON__UINT_PTR context,double fraction_complete),
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [makefile:69: opennurbs_3dm_attributes.o] Error 1
make: *** Waiting for unfinished jobs…
20 errors generated.
20 errors generated.
20 errors generated.
make: *** [makefile:69: opennurbs_annotationbase.o] Error 1
make: *** [makefile:69: opennurbs_arccurve.o] Error 1
make: *** [makefile:69: opennurbs_3dm_properties.o] Error 1
20 errors generated.
make: *** [makefile:69: opennurbs_archive_manifest.o] Error 1
20 errors generated.
make: *** [makefile:69: opennurbs_3dm_settings.o] Error 1
20 errors generated.
20 errors generated.
make: *** [makefile:69: opennurbs_arc.o] Error 1
make: *** [makefile:69: opennurbs_archive.o] Error 1
➜ opennurbs git:(master) ✗

Any further suggestions?

Cheers

For now to just use the CMake approach of rhino3dm and use that OpenNURBS lib that gets created for it.

This week @will is going to update the public OpenNURBS repository with the latest code changes that I tested on Linux Mint 18 also using the makefile and Clang. We can then check what the status is, since we’d the be looking at the same codebase.

I’ve just updated the public opennurbs repository (see #9). You should now be able to build with clang.

$ make -e CC="clang" CCC="clang++" LINKFLAGS="-luuid"

For Ubuntu 18.04 you can install build tools/dependencies using sudo apt install make clang uuid-dev.