I just configured embree and having trouble compiling it on my Linux x368 machine running Ubuntu. I don't have icc installed so I'm assuming it's using g++. Is there something else I need to include?
[ 1%] Building CXX object common/sys/CMakeFiles/sys.dir/platform.o
In file included from /tmp/embree-1.1beta/common/sys/platform.cpp:18:0:
/tmp/embree-1.1beta/common/sys/intrinsics.h: In function ‘T* atomic_xchg(T* volatile*, const T*)’:
/tmp/embree-1.1beta/common/sys/intrinsics.h:232:53: error: no matching function for call to ‘atomic_xchg(int32*&, int32&)’
/tmp/embree-1.1beta/common/sys/intrinsics.h:232:53: note: candidate is:
/tmp/embree-1.1beta/common/sys/intrinsics.h:231:18: note: template<class T> T* atomic_xchg(T* volatile*, const T*)
make: *** [common/sys/CMakeFiles/sys.dir/platform.o] Error 1
make: *** [common/sys/CMakeFiles/sys.dir/all] Error 2
make: *** [all] Error 2
The compiler does not list the atomic_xchg(int32 volatile*, int32, int32) declared some lines above as a candidate. Maybe the issue is that the template where the error occurs also has the atomic_xchg name. Rename the template to atomic_xchg_ptr including its use in the file rtcore/common/atomic_set.h.