Unable to compile any example files for IrrNewt.
Unable to compile any example files for IrrNewt.
As a last resort, (I should have done this earlier) I am posting here to ask for your helping hand.
I spent hours today trying to work out tons of syntax errors that I was getting for IrrNewt examples. I even had to change some of the scripture in the included files for IrrNewt, but I just plain have no idea what a solution or alternative could be for this last linker error that I've been trying to work out..
I'm using Dev-C++.
The example file I am attempting to compile is ragdoll.cpp. (Though I have this same problem for anything that uses createBody() or createBodyAuto())
------------Here is the related code:----------------
----CODE:--------------------------------------------
---- //INI PHYSICS
---- p_world = irr::newton::createPhysicsWorld(device);
---- ragdoll_material = p_world->createMaterial();
---- world_material = p_world->createMaterial();
---- cube_material = p_world->createMaterial();
----
---- p_world->createBodyAuto(world_node, world_mesh)->setMaterial(world_material);
-------------------------------------------------------
------------Here is the linker error:-----------------
----CODE:--------------------------------------------
---- [Linker error] undefined reference to `_imp___ZN3irr6newton6IWorld14createBodyAutoEPNS_5scene10ISceneNodeEPNS2_5IMeshEfjNS_4core8CMatrix4IfEENS7_8vector3dIfEENS0_18E_CALCULATE_OFFSETENS0_16E_CALCULATE_SIZEE'
---- ld returned 1 exit status
-------------------------------------------------------
I bolded the function name in the linker error to show that they are related.
Here's what I tried:
Compiling with the latest version of Irrlicht as well as Irrlicht v1.2.
Using the createBody() function instead of createBodyAuto() with the same parameters.
If more information is needed to troubleshoot, feel free to request that I give it.
Any help/suggestions would be greatly appreciated!
- CheeseKeg.
By the way, the reason I didn't put the code in code blocks is because I wanted to highlight createBodyAuto in both.
I spent hours today trying to work out tons of syntax errors that I was getting for IrrNewt examples. I even had to change some of the scripture in the included files for IrrNewt, but I just plain have no idea what a solution or alternative could be for this last linker error that I've been trying to work out..
I'm using Dev-C++.
The example file I am attempting to compile is ragdoll.cpp. (Though I have this same problem for anything that uses createBody() or createBodyAuto())
------------Here is the related code:----------------
----CODE:--------------------------------------------
---- //INI PHYSICS
---- p_world = irr::newton::createPhysicsWorld(device);
---- ragdoll_material = p_world->createMaterial();
---- world_material = p_world->createMaterial();
---- cube_material = p_world->createMaterial();
----
---- p_world->createBodyAuto(world_node, world_mesh)->setMaterial(world_material);
-------------------------------------------------------
------------Here is the linker error:-----------------
----CODE:--------------------------------------------
---- [Linker error] undefined reference to `_imp___ZN3irr6newton6IWorld14createBodyAutoEPNS_5scene10ISceneNodeEPNS2_5IMeshEfjNS_4core8CMatrix4IfEENS7_8vector3dIfEENS0_18E_CALCULATE_OFFSETENS0_16E_CALCULATE_SIZEE'
---- ld returned 1 exit status
-------------------------------------------------------
I bolded the function name in the linker error to show that they are related.
Here's what I tried:
Compiling with the latest version of Irrlicht as well as Irrlicht v1.2.
Using the createBody() function instead of createBodyAuto() with the same parameters.
If more information is needed to troubleshoot, feel free to request that I give it.
Any help/suggestions would be greatly appreciated!
- CheeseKeg.
By the way, the reason I didn't put the code in code blocks is because I wanted to highlight createBodyAuto in both.
Hmm did you pragma comented the irr newt lib ?
if not
write this :
if not
write this :
Code: Select all
#pragma comment(lib, "IrrNewt.lib")
Working on game: Marrbles (Currently stopped).
Re: Unable to compile any example files for IrrNewt.
------------Heres my hint:--------------------------CheeseKeg wrote: ------------Here is the related code:----------------
----CODE:--------------------------------------------
---- //INI PHYSICS
---- p_world = irr::newton::createPhysicsWorld(device);
---- ragdoll_material = p_world->createMaterial();
---- world_material = p_world->createMaterial();
---- cube_material = p_world->createMaterial();
----
---- p_world->createBodyAuto(world_node, world_mesh)->setMaterial(world_material);
-------------------------------------------------------
----HINT:--------------------------------------------
---- //FOR CheeseKeg
---- you
---- should
---- use
----
Code: Select all
---- instead
---- of
---- -------------------------------
---- !!
---- because
---- it
---- keep
---- code
---- readable!
[b]-------------------------------------------------------[/b]
Re: Unable to compile any example files for IrrNewt.
CheeseKeg wrote: By the way, the reason I didn't put the code in code blocks is because I wanted to highlight createBodyAuto in both.
Software documentation is like sex. If it's good you want more. If it's bad it's better than nothing.
He's using DevCpp so this pragma will be ignored...serengeor wrote:Hmm did you pragma comented the irr newt lib ?
if not
write this :Code: Select all
#pragma comment(lib, "IrrNewt.lib")
in DevCpp you'll need to add the lib to the linker settings !!!
and as standard advice for DevCpp users: try Code::Blocks instead, it's much better and still supported (DevCpp is not since a long time)...
you mean code tags, for sure...CheeseKeg wrote: By the way, the reason I didn't put the code in code blocks is because I wanted to highlight createBodyAuto in both.
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
Re: Unable to compile any example files for IrrNewt.
Malgodur wrote: ------------Heres my hint:--------------------------
----HINT:--------------------------------------------
---- //FOR CheeseKeg
---- you
---- should
---- use
----I assure you that all of the locations are valid and the libraries do exist in those directoriesCode: Select all
---- instead ---- of ---- ------------------------------- ---- !! ---- because ---- it ---- keep ---- code ---- readable! [b]-------------------------------------------------------[/b][/quote] I see that you definitely had to have read my entire post.. I'm not blind, I can clearly see the CODE BBC, but due to the validity of my highlighting text within the code, and since it's only actually six to eight lines of code total (Only two that need any attention at all), I think you can abide to my post's format. ------ I appreciate the suggestions that everyone else is handing to me. I am using Dev-C++. (as mentioned in my first post) Here are the linked libraries: [code]../../lib/win32-gcc/libIrrNewt.a ../../../Irrlicht/irrlicht-1.5/lib/Win32-gcc/libIrrlicht.a ../../../NewtonSDK/sdk/dll/Newton.lib
-
- Posts: 24
- Joined: Mon May 25, 2009 2:18 pm
- Location: Brazil
- Contact:
Hey! I'm getting a similar problem. I've downloaded the ShTlTerrainSceneNode and was trying to compile it. I only had to change a single line
scene::E_DEBUG_SCENE_TYPE dtype = terrain->isDebugDataVisible();
to
scene::E_DEBUG_SCENE_TYPE dtype = scene::E_DEBUG_SCENE_TYPE(terrain->isDebugDataVisible());
I thought typecasting should be automatic, since scene::E_DEBUG_SCENE_TYPE is an ENUM, and terrain->isDebugDataVisible() returns a s32, shouldn't it? But now it keeps telling that
main.cpp||undefined reference to `_imp___ZN3irr12createDeviceENS_5video13E_DRIVER_TYPEERKNS_4core11dimension2dIiEEjbbbPNS_14IEventReceiverE'|
main.cpp||undefined reference to `_imp___ZN3irr12createDeviceENS_5video13E_DRIVER_TYPEERKNS_4core11dimension2dIiEEjbbbPNS_14IEventReceiverE'|
main.cpp||undefined reference to `ShTlTerrainSceneNode::ShTlTerrainSceneNode(irr::scene::ISceneManager*, int, int, float, int, irr::scene::ISceneNode*, int)'|
||=== Build finished: 3 errors, 0 warnings ===|
I have unzipped the demo and source to the same folder, and added that folder to the Compiler and Linker search directories. What else should be done? I've got the same error in Dev-C++ and Code::Blocks. I'm using IrrLicht 1.5 under Windows XP.
Thanks in advance!
scene::E_DEBUG_SCENE_TYPE dtype = terrain->isDebugDataVisible();
to
scene::E_DEBUG_SCENE_TYPE dtype = scene::E_DEBUG_SCENE_TYPE(terrain->isDebugDataVisible());
I thought typecasting should be automatic, since scene::E_DEBUG_SCENE_TYPE is an ENUM, and terrain->isDebugDataVisible() returns a s32, shouldn't it? But now it keeps telling that
main.cpp||undefined reference to `_imp___ZN3irr12createDeviceENS_5video13E_DRIVER_TYPEERKNS_4core11dimension2dIiEEjbbbPNS_14IEventReceiverE'|
main.cpp||undefined reference to `_imp___ZN3irr12createDeviceENS_5video13E_DRIVER_TYPEERKNS_4core11dimension2dIiEEjbbbPNS_14IEventReceiverE'|
main.cpp||undefined reference to `ShTlTerrainSceneNode::ShTlTerrainSceneNode(irr::scene::ISceneManager*, int, int, float, int, irr::scene::ISceneNode*, int)'|
||=== Build finished: 3 errors, 0 warnings ===|
I have unzipped the demo and source to the same folder, and added that folder to the Compiler and Linker search directories. What else should be done? I've got the same error in Dev-C++ and Code::Blocks. I'm using IrrLicht 1.5 under Windows XP.
Thanks in advance!
I feel, therefore I am.
-
- Posts: 24
- Joined: Mon May 25, 2009 2:18 pm
- Location: Brazil
- Contact:
For the case anyone run into a similar problem:
Project options:
Search directories:
Compiler:
......irrlicht-1.5\include
Linker:
......irrlicht-1.5\lib\Win32-gcc (or anyone you're using)
and
Linker settings:
Link libraries:
......irrlicht-1.5\lib\Win32-gcc\libIrrlicht.a
That's all!
Project options:
Search directories:
Compiler:
......irrlicht-1.5\include
Linker:
......irrlicht-1.5\lib\Win32-gcc (or anyone you're using)
and
Linker settings:
Link libraries:
......irrlicht-1.5\lib\Win32-gcc\libIrrlicht.a
That's all!
I feel, therefore I am.