Help with IPhysics
Help with IPhysics
Hi,
I can't compile my project using IPhysics.
The problem is when linking.
The message that appears is:
.objs\main.o:main.cpp:(.text+0x13e): undefined reference to `CPhysics::CPhysics()'
.objs\main.o:main.cpp:(.text+0x167): undefined reference to `CPhysics::init(irr::ITimer*)'
.objs\main.o:main.cpp:(.text+0x28d): undefined reference to `CPhysics::addEntity(SPhysicsCube*)'
.objs\main.o:main.cpp:(.text+0x3fe): undefined reference to `CPhysics::addEntity(SPhysicsCube*)'
.objs\main.o:main.cpp:(.text+0x492): undefined reference to `CPhysics::update()'
.objs\main.o:main.cpp:(.text+0x502): undefined reference to `CPhysics::~CPhysics()'
.objs\main.o:main.cpp:(.text+0x529): undefined reference to `CPhysics::~CPhysics()'
collect2: ld returned 1 exit status
Can anyone help?
I can't compile my project using IPhysics.
The problem is when linking.
The message that appears is:
.objs\main.o:main.cpp:(.text+0x13e): undefined reference to `CPhysics::CPhysics()'
.objs\main.o:main.cpp:(.text+0x167): undefined reference to `CPhysics::init(irr::ITimer*)'
.objs\main.o:main.cpp:(.text+0x28d): undefined reference to `CPhysics::addEntity(SPhysicsCube*)'
.objs\main.o:main.cpp:(.text+0x3fe): undefined reference to `CPhysics::addEntity(SPhysicsCube*)'
.objs\main.o:main.cpp:(.text+0x492): undefined reference to `CPhysics::update()'
.objs\main.o:main.cpp:(.text+0x502): undefined reference to `CPhysics::~CPhysics()'
.objs\main.o:main.cpp:(.text+0x529): undefined reference to `CPhysics::~CPhysics()'
collect2: ld returned 1 exit status
Can anyone help?
~If your using Dev C++
Are the include folder files in the compilers include folder or not? If not you have to include them manually with Project Options->Directories->Include Directories then add the folder the IPhysics include files are in to it. Also, you may wanna put IPhysics at top, of the included directories list.
Are the include folder files in the compilers include folder or not? If not you have to include them manually with Project Options->Directories->Include Directories then add the folder the IPhysics include files are in to it. Also, you may wanna put IPhysics at top, of the included directories list.
I just tried compiling the example source with all the project options set up, and I get this:
Compiler: Default compiler
Building Makefile: "C:\Dev-Cpp\Makefile.win"
Executing make...
make.exe -f "C:\Dev-Cpp\Makefile.win" all
g++.exe -D__DEBUG__ -c ../Gooball/IPhysics-1.2/examples/examples_source/main.cpp -o ../Gooball/IPhysics-1.2/examples/examples_source/main.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include" -I"C:/Gooball/IPhysics-1.2/include" -I"C:/NewtonSDK/sdk" -I"C:/irr/include" -g3 -mwindows
In file included from ../Gooball/IPhysics-1.2/examples/examples_source/main.cpp:5:
../Gooball/IPhysics-1.2/examples/examples_source/global.h:32:7: warning: no newline at end of file
In file included from ../Gooball/IPhysics-1.2/examples/examples_source/main.cpp:6:
../Gooball/IPhysics-1.2/examples/examples_source/example1.h:68:2: warning: no newline at end of file
In file included from ../Gooball/IPhysics-1.2/examples/examples_source/main.cpp:7:
../Gooball/IPhysics-1.2/examples/examples_source/example2.h:96:2: warning: no newline at end of file
In file included from ../Gooball/IPhysics-1.2/examples/examples_source/main.cpp:8:
../Gooball/IPhysics-1.2/examples/examples_source/example3.h:178:2: warning: no newline at end of file
../Gooball/IPhysics-1.2/examples/examples_source/main.cpp:31:2: warning: no newline at end of file
g++.exe -D__DEBUG__ ../Gooball/IPhysics-1.2/examples/examples_source/main.o -o "test.exe" -L"C:/Dev-Cpp/lib" -L"C:/irr/lib/Win32-gcc" -L"C:/NewtonSDK/sdk/dll" -L"C:/Gooball/IPhysics-1.2/lib" ../Gooball/IPhysics-1.2/lib/IPhysics.lib -g3 -mwindows
../Gooball/IPhysics-1.2/examples/examples_source/main.o(.text+0xa8): In function `ZN18CEventReceiver_eg27OnEventEN3irr6SEventE':
C:/irr/include/IEventReceiver.h: undefined reference to `_imp___ZN3irr12createDeviceENS_5video13E_DRIVER_TYPEERKNS_4core11dimension2dIiEEjbbbPNS_14IEventReceiverEPKc'
../Gooball/IPhysics-1.2/examples/examples_source/main.o(.text+0x170):C:/irr/include/IEventReceiver.h: undefined reference to `CPhysics::CPhysics()'
../Gooball/IPhysics-1.2/examples/examples_source/main.o(.text+0x19e):C:/irr/include/IEventReceiver.h: undefined reference to `CPhysics::init(irr::ITimer*)'
../Gooball/IPhysics-1.2/examples/examples_source/main.o(.text+0x2d5):C:/irr/include/IEventReceiver.h: undefined reference to `CPhysics::addEntity(SPhysicsCube*)'
../Gooball/IPhysics-1.2/examples/examples_source/main.o(.text+0x471):C:/irr/include/IEventReceiver.h: undefined reference to `CPhysics::addEntity(SPhysicsCube*)'
../Gooball/IPhysics-1.2/examples/examples_source/main.o(.text+0x58c):C:/irr/include/IEventReceiver.h: undefined reference to `CPhysics::update()'
../Gooball/IPhysics-1.2/examples/examples_source/main.o(.text+0x5c4):C:/irr/include/IEventReceiver.h: undefined reference to `CPhysics::~CPhysics()'
../Gooball/IPhysics-1.2/examples/examples_source/main.o(.text+0x600):C:/irr/include/IEventReceiver.h: undefined reference to `CPhysics::~CPhysics()'
../Gooball/IPhysics-1.2/examples/examples_source/main.o(.text+0x6c6): In function `Z11runExample2v':
C:/Dev-Cpp/../Gooball/IPhysics-1.2/examples/examples_source/example2.h:45: undefined reference to `_imp___ZN3irr12createDeviceENS_5video13E_DRIVER_TYPEERKNS_4core11dimension2dIiEEjbbbPNS_14IEventReceiverEPKc'
../Gooball/IPhysics-1.2/examples/examples_source/main.o(.text+0x78e):C:/Dev-Cpp/../Gooball/IPhysics-1.2/examples/examples_source/example2.h:59: undefined reference to `CPhysics::CPhysics()'
../Gooball/IPhysics-1.2/examples/examples_source/main.o(.text+0x7b9):C:/Dev-Cpp/../Gooball/IPhysics-1.2/examples/examples_source/example2.h:60: undefined reference to `CPhysics::init(irr::ITimer*)'
../Gooball/IPhysics-1.2/examples/examples_source/main.o(.text+0xa5f):C:/Dev-Cpp/../Gooball/IPhysics-1.2/examples/examples_source/example2.h:84: undefined reference to `CPhysics::addEntity(SPhysicsTerrain*)'
../Gooball/IPhysics-1.2/examples/examples_source/main.o(.text+0xb25):C:/Dev-Cpp/../Gooball/IPhysics-1.2/examples/examples_source/example2.h:93: undefined reference to `CPhysics::update()'
../Gooball/IPhysics-1.2/examples/examples_source/main.o(.text+0xbab):C:/Dev-Cpp/../Gooball/IPhysics-1.2/examples/examples_source/example2.h:93: undefined reference to `CPhysics::~CPhysics()'
../Gooball/IPhysics-1.2/examples/examples_source/main.o(.text+0xbe4):C:/Dev-Cpp/../Gooball/IPhysics-1.2/examples/examples_source/example2.h:93: undefined reference to `CPhysics::~CPhysics()'
../Gooball/IPhysics-1.2/examples/examples_source/main.o(.text+0xcaa): In function `Z11runExample3v':
C:/Dev-Cpp/../Gooball/IPhysics-1.2/examples/examples_source/example3.h:96: undefined reference to `_imp___ZN3irr12createDeviceENS_5video13E_DRIVER_TYPEERKNS_4core11dimension2dIiEEjbbbPNS_14IEventReceiverEPKc'
../Gooball/IPhysics-1.2/examples/examples_source/main.o(.text+0xe0f):C:/Dev-Cpp/../Gooball/IPhysics-1.2/examples/examples_source/example3.h:113: undefined reference to `CPhysics::CPhysics()'
../Gooball/IPhysics-1.2/examples/examples_source/main.o(.text+0xe3d):C:/Dev-Cpp/../Gooball/IPhysics-1.2/examples/examples_source/example3.h:114: undefined reference to `CPhysics::init(irr::ITimer*)'
../Gooball/IPhysics-1.2/examples/examples_source/main.o(.text+0x1516):C:/Dev-Cpp/../Gooball/IPhysics-1.2/examples/examples_source/example3.h:151: undefined reference to `CPhysics::addCar(SPhysicsCar*)'
../Gooball/IPhysics-1.2/examples/examples_source/main.o(.text+0x16e8):C:/Dev-Cpp/../Gooball/IPhysics-1.2/examples/examples_source/example3.h:167: undefined reference to `CPhysics::addEntity(SPhysicsStaticMesh*)'
../Gooball/IPhysics-1.2/examples/examples_source/main.o(.text+0x17b1):C:/Dev-Cpp/../Gooball/IPhysics-1.2/examples/examples_source/example3.h:176: undefined reference to `CPhysics::update()'
../Gooball/IPhysics-1.2/examples/examples_source/main.o(.text+0x1840):C:/Dev-Cpp/../Gooball/IPhysics-1.2/examples/examples_source/example3.h:176: undefined reference to `CPhysics::~CPhysics()'
../Gooball/IPhysics-1.2/examples/examples_source/main.o(.text+0x187c):C:/Dev-Cpp/../Gooball/IPhysics-1.2/examples/examples_source/example3.h:176: undefined reference to `CPhysics::~CPhysics()'
../Gooball/IPhysics-1.2/examples/examples_source/main.o(.text$_ZN18CEventReceiver_eg27OnEventEN3irr6SEventE[CEventReceiver_eg2::OnEvent(irr::SEvent)]+0x65): In function `ZN18CEventReceiver_eg27OnEventEN3irr6SEventE':
C:/irr/include/IEventReceiver.h: undefined reference to `CPhysics::dropTestCube(irr::scene::ISceneManager*, irr::core::vector3d<float>, float, float)'
../Gooball/IPhysics-1.2/examples/examples_source/main.o(.text$_ZN18CEventReceiver_eg27OnEventEN3irr6SEventE[CEventReceiver_eg2::OnEvent(irr::SEvent)]+0xc0):C:/irr/include/IEventReceiver.h: undefined reference to `CPhysics::dropTestSphere(irr::scene::ISceneManager*, irr::core::vector3d<float>, float, float)'
collect2: ld returned 1 exit status
make.exe: *** [test.exe] Error 1
Execution terminated
-
- Posts: 1029
- Joined: Thu Apr 06, 2006 12:45 am
- Location: Tennesee, USA
- Contact: