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

Compilation error linux mint 19.2 #183

Closed nattydread69 closed 4 years ago

nattydread69 commented 5 years ago

with g++ (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0

newton-dynamics/sdk/dgCore/dgTypes.h:557:34: error: invalid conversion from ‘int’ to ‘void*’ [-fpermissive]

return __sync_lock_test_and_set((int32_t*)ptr, value);

harriv commented 4 years ago

I've same problem with Ubuntu 19.04, gcc version 8.3.0 (Ubuntu 8.3.0-6ubuntu1)

hogsy commented 4 years ago

Slipped up on this one myself, looks like __sync_lock_test_and_set just needed to be cast to void* here, e.g.

return (void*)__sync_lock_test_and_set((int32_t*)ptr, value);

Not sure if that's all that's needed.