iphysics help
Re: iphysics help
You're not linking to the proper libraries.killsto wrote:I'm trying to use Iphysics for fun. I've downloaded it, linked it, and tried to compile the hello world. At first, I realized the documentation is out of date because the CPhysics initializer requres an ITimer pointer. I fixed that and now get this:
I'm using Irrlicht 1.4.2, newton 1.53, and Iphysics 1.2. Is there a more recent version? I can't find one.Code: Select all
1>Linking... 1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall CPhysics::~CPhysics(void)" (??1CPhysics@@QAE@XZ) referenced in function _main 1>main.obj : error LNK2019: unresolved external symbol "public: void __thiscall CPhysics::update(float)" (?update@CPhysics@@QAEXM@Z) referenced in function _main 1>main.obj : error LNK2019: unresolved external symbol "public: class IPhysicsEntity * __thiscall CPhysics::addEntity(struct SPhysicsCube *)" (?addEntity@CPhysics@@QAEPAVIPhysicsEntity@@PAUSPhysicsCube@@@Z) referenced in function _main 1>main.obj : error LNK2019: unresolved external symbol "public: void __thiscall CPhysics::init(class irr::ITimer *)" (?init@CPhysics@@QAEXPAVITimer@irr@@@Z) referenced in function _main 1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall CPhysics::CPhysics(void)" (??0CPhysics@@QAE@XZ) referenced in function _main 1>C:\Documents and Settings\Killian\My Documents\Visual Studio 2008\Projects\testing\Debug\irrlicht_test.exe : fatal error LNK1120: 5 unresolved externals
- The glory days.it also could be the order of the libs !!!
I link first to libNewton.a and after that to libIPhysics.a and it works !!!
If I link first to IPhysics then I'll get linker errors...
I link first to libNewton.a and after that to libIPhysics.a and it works !!!
If I link first to IPhysics then I'll get linker errors...
while(!asleep) sheep++;
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:

http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
just adding the directories is not enough...
did you also link against the IPhysics and Newton libs ???
for VS it is usually a pragma statement at the beginning of the main.cpp (like the one for Irrlicht.lib)...
so it should look something like this:
did you also link against the IPhysics and Newton libs ???
for VS it is usually a pragma statement at the beginning of the main.cpp (like the one for Irrlicht.lib)...
so it should look something like this:
Code: Select all
#pragma comment(lib, "Irrlicht.lib")
#pragma comment(lib, "IPhysics.lib")
#pragma comment(lib, "Newton.lib")while(!asleep) sheep++;
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:

http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
I'm now getting this:
Does this mean I need an older version of Irrlicht?
Code: Select all
1>IPhysics.lib(CPhysics.obj) : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance
1>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>main.obj : error LNK2001: unresolved external symbol "class irr::IrrlichtDevice * __cdecl irr::createDevice(enum irr::video::E_DRIVER_TYPE,class irr::core::dimension2d<int> const &,unsigned int,bool,bool,bool,class irr::IEventReceiver *,char const *)" (?createDevice@irr@@YAPAVIrrlichtDevice@1@W4E_DRIVER_TYPE@video@1@ABV?$dimension2d@H@core@1@I_N22PAVIEventReceiver@1@PBD@Z)
1>C:\Documents and Settings\Killian\My Documents\Visual Studio 2008\Projects\testing\Debug\irrlicht_test.exe : fatal error LNK1120: 1 unresolved externals-
omar shaaban
- Posts: 616
- Joined: Wed Nov 01, 2006 6:26 pm
- Location: Cairo,Egypt
- Contact:
and how did u fix this error!!?killsto wrote:I'm now getting this:Does this mean I need an older version of Irrlicht?Code: Select all
1>IPhysics.lib(CPhysics.obj) : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance 1>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library 1>main.obj : error LNK2001: unresolved external symbol "class irr::IrrlichtDevice * __cdecl irr::createDevice(enum irr::video::E_DRIVER_TYPE,class irr::core::dimension2d<int> const &,unsigned int,bool,bool,bool,class irr::IEventReceiver *,char const *)" (?createDevice@irr@@YAPAVIrrlichtDevice@1@W4E_DRIVER_TYPE@video@1@ABV?$dimension2d@H@core@1@I_N22PAVIEventReceiver@1@PBD@Z) 1>C:\Documents and Settings\Killian\My Documents\Visual Studio 2008\Projects\testing\Debug\irrlicht_test.exe : fatal error LNK1120: 1 unresolved externals