I am trying to use Eclipse C++ and Irrlicht to a project in school. My problem is to set op the environment.
I have used this http://irrlicht3d.org/wiki/index.php?n=Main.Macintosh
I am using the new MacBook Pro.
I think the error is in this flag.
**** Build of configuration Debug for project HalloWorld2 ****
make all
Building file: ../src/helloworld.cpp
Invoking: GCC C++ Compiler
g++ -I/Users/JAMES/Code/irrlicht-1.7.2/include -O0 -g3 -Wall -c -fmessage-length=0 -arch i386 -fvisibility=hidden -MMD -MP -MF"src/helloworld.d" -MT"src/helloworld.d" -o "src/helloworld.o" "../src/helloworld.cpp"
Finished building: ../src/helloworld.cpp
Building target: HalloWorld2
Invoking: MacOS X C++ Linker
g++ -L/Users/JAMES/Code/irrlicht-1.7.2/source/Irrlicht/MacOSX/build/Release -L/Developer/SDKs/MacOSX10.6.sdk/usr/X11/lib -Xlinker -arch i386 -framework OpenGL -framework Carbon -framework Cocoa -framework IOKit -o "HalloWorld2" ./src/helloworld.o -lIrrlicht
i686-apple-darwin11-llvm-g++-4.2: i386: No such file or directory
make: *** [HalloWorld2] Error 1
The problem comes from the use of
-Xlinker
to pass arguments to the linker. The man page ofg++
says:Here
-Xlinker
appears only once whereas it should be appear between each argument sent to the linker. So a ugly solution is to write:But if you find a way to configure Eclipse to use
-Wl,
instead of-Xlinker
it would be better I think:Then you could use: