ThreadingDemo posix thread support missing?

djslim
Posts: 2
Joined: Mon Jul 05, 2010 9:46 pm

ThreadingDemo posix thread support missing?

Post by djslim »

I may be reading this wrong, but it looks like main.cpp in ThreadingDemo (SVN Trunk) is biased towards windows and Mac? I don't see any branch that is taking care of posix thread support. I'm trying to compile using the following cmake directive

Code: Select all

cmake .. -G "Unix Makefiles" -DBUILD_SHARED_LIBX=ON
and getting the following errors

Code: Select all

Linking CXX shared library libBulletMultiThreaded.so
[ 97%] Built target BulletMultiThreaded
[ 97%] Building CXX object Demos/ThreadingDemo/CMakeFiles/AppThreadingDemo.dir/main.o
/home/slim/Downloads/bullet-read-only/Demos/ThreadingDemo/main.cpp:59: error: ISO C++ forbids declaration of ‘btCriticalSection’ with no type
/home/slim/Downloads/bullet-read-only/Demos/ThreadingDemo/main.cpp:59: error: expected ‘;’ before ‘*’ token
/home/slim/Downloads/bullet-read-only/Demos/ThreadingDemo/main.cpp: In function ‘void SampleThreadFunc(void*, void*)’:
/home/slim/Downloads/bullet-read-only/Demos/ThreadingDemo/main.cpp:70: error: ‘printf’ was not declared in this scope
/home/slim/Downloads/bullet-read-only/Demos/ThreadingDemo/main.cpp:78: error: ‘struct SampleArgs’ has no member named ‘m_cs’
/home/slim/Downloads/bullet-read-only/Demos/ThreadingDemo/main.cpp:79: error: ‘struct SampleArgs’ has no member named ‘m_cs’
/home/slim/Downloads/bullet-read-only/Demos/ThreadingDemo/main.cpp:80: error: ‘struct SampleArgs’ has no member named ‘m_cs’
/home/slim/Downloads/bullet-read-only/Demos/ThreadingDemo/main.cpp:81: error: ‘struct SampleArgs’ has no member named ‘m_cs’
/home/slim/Downloads/bullet-read-only/Demos/ThreadingDemo/main.cpp: In function ‘int main(int, char**)’:
/home/slim/Downloads/bullet-read-only/Demos/ThreadingDemo/main.cpp:112: error: ‘btThreadSupportInterface’ was not declared in this scope
/home/slim/Downloads/bullet-read-only/Demos/ThreadingDemo/main.cpp:112: error: ‘threadSupport’ was not declared in this scope
/home/slim/Downloads/bullet-read-only/Demos/ThreadingDemo/main.cpp:112: error: ‘createThreadSupport’ was not declared in this scope
/home/slim/Downloads/bullet-read-only/Demos/ThreadingDemo/main.cpp:120: error: ‘btAssert’ was not declared in this scope
/home/slim/Downloads/bullet-read-only/Demos/ThreadingDemo/main.cpp:126: error: ‘struct SampleArgs’ has no member named ‘m_cs’
/home/slim/Downloads/bullet-read-only/Demos/ThreadingDemo/main.cpp:127: error: ‘struct SampleArgs’ has no member named ‘m_cs’
/home/slim/Downloads/bullet-read-only/Demos/ThreadingDemo/main.cpp:134: error: ‘ppu_address_t’ was not declared in this scope
/home/slim/Downloads/bullet-read-only/Demos/ThreadingDemo/main.cpp:143: error: ‘printf’ was not declared in this scope
/home/slim/Downloads/bullet-read-only/Demos/ThreadingDemo/main.cpp:162: error: ‘btAssert’ was not declared in this scope
/home/slim/Downloads/bullet-read-only/Demos/ThreadingDemo/main.cpp:163: error: ‘printf’ was not declared in this scope
/home/slim/Downloads/bullet-read-only/Demos/ThreadingDemo/main.cpp:164: error: ‘exit’ was not declared in this scope
/home/slim/Downloads/bullet-read-only/Demos/ThreadingDemo/main.cpp:168: error: ‘printf’ was not declared in this scope
/home/slim/Downloads/bullet-read-only/Demos/ThreadingDemo/main.cpp:170: error: type ‘<type error>’ argument given to ‘delete’, expected pointer
/home/slim/Downloads/bullet-read-only/Demos/ThreadingDemo/main.cpp:172: error: ‘getchar’ was not declared in this scope
make[2]: *** [Demos/ThreadingDemo/CMakeFiles/AppThreadingDemo.dir/main.o] Error 1
make[1]: *** [Demos/ThreadingDemo/CMakeFiles/AppThreadingDemo.dir/all] Error 2
make: *** [all] Error 2
djslim
Posts: 2
Joined: Mon Jul 05, 2010 9:46 pm

Re: ThreadingDemo posix thread support missing?

Post by djslim »

I looked at it again, and it looks like it's shoving linux into the apple #ifdef section