I am having problems getting crrcsim 0.9.12 to compile on my Mac Book Pro (10.7.3 Intel). I have installed plib, jpeg, and portaudio via macports. It is important to note that I can get crrcsim 0.9.9 to compile but that version does not have support for the CT6A input device which I need.
When I run the following configure (0.9.12) script everything works fine.
./configure CPPFLAGS=-I/opt/local/include LDFLAGS="-L/opt/local/lib -framework OpenGL"
But when I run:
make
I get the following errors.
mv -f .deps/crrcsim-filesystools.Tpo .deps/crrcsim-filesystools.Po
g++ -DHAVE_CONFIG_H -I. -I/opt/local/include -D_THREAD_SAFE -I/usr/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE -DPU_USE_SDL -DCRRC_DATA_PATH="\"/usr/local/share/crrcsim\"" -g -O2 -DMACOSX -Wall -MT crrcsim-SimpleXMLTransfer.o -MD -MP -MF .deps/crrcsim-SimpleXMLTransfer.Tpo -c -o crrcsim-SimpleXMLTransfer.o `test -f 'src/mod_misc/SimpleXMLTransfer.cpp' || echo './'`src/mod_misc/SimpleXMLTransfer.cpp
mv -f .deps/crrcsim-SimpleXMLTransfer.Tpo .deps/crrcsim-SimpleXMLTransfer.Po
g++ -DHAVE_CONFIG_H -I. -I/opt/local/include -D_THREAD_SAFE -I/usr/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE -DPU_USE_SDL -DCRRC_DATA_PATH="\"/usr/local/share/crrcsim\"" -g -O2 -DMACOSX -Wall -MT crrcsim-airplane_vis.o -MD -MP -MF .deps/crrcsim-airplane_vis.Tpo -c -o crrcsim-airplane_vis.o `test -f 'src/mod_video/airplane_vis.cpp' || echo './'`src/mod_video/airplane_vis.cpp
In file included from src/mod_video/airplane_vis.cpp:30:
src/mod_video/shadow.h:55: error: ISO C++ forbids declaration of 'APIENTRY' with no type
src/mod_video/shadow.h:55: error: 'APIENTRY' is neither function nor member function; cannot be declared friend
src/mod_video/shadow.h:55: error: expected ';' before 'void'
src/mod_video/shadow.h:56: error: ISO C++ forbids declaration of 'APIENTRY' with no type
src/mod_video/shadow.h:56: error: 'APIENTRY' is neither function nor member function; cannot be declared friend
src/mod_video/shadow.h:56: error: expected ';' before 'void'
src/mod_video/shadow.h:57: error: ISO C++ forbids declaration of 'APIENTRY' with no type
src/mod_video/shadow.h:57: error: 'APIENTRY' is neither function nor member function; cannot be declared friend
src/mod_video/shadow.h:57: error: expected ';' before 'void'
src/mod_video/shadow.h:58: error: ISO C++ forbids declaration of 'APIENTRY' with no type
src/mod_video/shadow.h:58: error: 'APIENTRY' is neither function nor member function; cannot be declared friend
src/mod_video/shadow.h:58: error: expected ';' before 'void'
src/mod_video/shadow.h:59: error: ISO C++ forbids declaration of 'APIENTRY' with no type
src/mod_video/shadow.h:59: error: 'APIENTRY' is neither function nor member function; cannot be declared friend
src/mod_video/shadow.h:59: error: expected ';' before 'void'
make[2]: *** [crrcsim-airplane_vis.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
Thoughts? Suggestions?
Thanks in advance.
This issue is more than a year old, but I thought I would still contribute my two cents: I am also trying to compile CRRCSim on Mac OS, using OSX 10.9 (Mavericks) and either MacPorts or homebrew for installing dependencies.
I have been running into other problems and cannot confirm / reproduce the problem that you are experiencing.
Note: I have yesterday been able to successfully compile CRRCSim using the following build instructions. (When I execute the binary, it crashes, probably because PortAudio v19 is incompatible with CRRCSim <= 0.9.12. But hey, being able to compile without errors is one step forwards!).
One key to getting around "implicit instantiation of template" compile errors is to use the correct compiler. You need to compile using gcc instead of clang by prefixing the ./configure command with e.g.,
CC=gcc-4.7 CXX=g++-4.7
as seen in the below instructions.Instructions heavily inspired by:
http://blog.mywarwithentropy.com/2012/03/how-to-compile-crrcsim-v0912-for-mac.html
Result: An app is produced that I can open from Finder. But it crashes upon launch, probably because of Portaudio, but I need to further investigate this.
Note: If I compile without portaudio, it works!! yeah!!! (put more precisely: crrcsim 0.9.12 compiles and executes correctly)
...otherwise follow build instructions as described above.