MADEAPPS / newton-dynamics

Newton Dynamics is an integrated solution for real time simulation of physics environments.
http://www.newtondynamics.com
Other
938 stars 182 forks source link

build failure on OSX #205

Open mikest opened 4 years ago

mikest commented 4 years ago

I'm getting a build failure after running cmake/make on OSX 10.14.6

[  1%] Building CXX object sdk/dgCore/CMakeFiles/dgCore.dir/dg.cpp.o
In file included from /Users/estee/newton-dynamics/sdk/dgCore/dg.cpp:22:
In file included from /Users/estee/newton-dynamics/sdk/dgCore/./dgStdafx.h:25:
/Users/estee/newton-dynamics/sdk/dgCore/./dgTypes.h:568:60: error: cannot initialize a parameter of type 'dgInt64' (aka 'long long') with an lvalue of type 'void *'
                                return (void*)__sync_lock_test_and_set((dgInt64*) ptr, value);
                                                                                       ^~~~~
1 error generated.
make[2]: *** [sdk/dgCore/CMakeFiles/dgCore.dir/dg.cpp.o] Error 1
make[1]: *** [sdk/dgCore/CMakeFiles/dgCore.dir/all] Error 2
make: *** [all] Error 2

removing the cast fixed the issue and the build continued: return (void*)__sync_lock_test_and_set(ptr, value);

JulioJerez commented 4 years ago

oh thank, that function was added later, afte some refactor for the Linux and MinWg cmake script but is not really use anywhere by the engine or demos. in fact I will be a big mistake if used because the engine does not uses pointer as atomic.

I commented out all and it seem to buidl fine, at least in windows.