Problem with ODE/Irrlicht tutorial

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
VagueNess
Posts: 15
Joined: Wed Jan 02, 2008 8:17 pm
Location: Holland

Problem with ODE/Irrlicht tutorial

Post by VagueNess »

Hello everyone,

I have a problem compiling this tutorial.

Code: Select all

(45-47) : warning C4305: '=' : truncation from 'double' to 'dReal'
(106) : warning C4305: 'argument' : truncation from 'double' to 'dReal'
(131) : warning C4305: 'argument' : truncation from 'double' to 'irr::f32'
(158) : warning C4305: 'argument' : truncation from 'double' to 'dReal'
ode.lib(convex.obj) : error LNK2019: unresolved external symbol "public: void __thiscall std::_String_base::_Xran(void)const " (?_Xran@_String_base@std@@QBEXXZ) referenced in function "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > & __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::erase(unsigned int,unsigned int)" (?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@II@Z)
ode.lib(convex.obj) : error LNK2019: unresolved external symbol "public: void __thiscall std::_String_base::_Xlen(void)const " (?_Xlen@_String_base@std@@QBEXXZ) referenced in function "protected: bool __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::_Grow(unsigned int,bool)" (?_Grow@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAE_NI_N@Z)
I'm using Irrlicht 1.4 and Visual C++ 2008 Express Edition for compiling.

Thank you.
Sorry for any bad English, I'm Dutch.
MasterGod
Posts: 2061
Joined: Fri May 25, 2007 8:06 pm
Location: Israel
Contact:

Post by MasterGod »

Be sure to link the ODE's lib too.
Image
Dev State: Abandoned (For now..)
Requirements Analysis Doc: ~87%
UML: ~0.5%
VagueNess
Posts: 15
Joined: Wed Jan 02, 2008 8:17 pm
Location: Holland

Post by VagueNess »

I already did that

Code: Select all

#pragma comment(lib, "ode.lib")
Thanks anyway
Sorry for any bad English, I'm Dutch.
ebo
Posts: 38
Joined: Sun Feb 19, 2006 5:39 pm

Post by ebo »

Don't use pragma. Add your libs in the project settings.

Also try to switch your program from Multithreaded libs to Single Threaded or vice versa.
VagueNess
Posts: 15
Joined: Wed Jan 02, 2008 8:17 pm
Location: Holland

Post by VagueNess »

I started with MT.
I tried all the others, and they didn't work.
No I switched it back, and I get another error along with the other two:

Code: Select all

LIBCMT.lib(wincrt0.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup
:s...
Sorry for any bad English, I'm Dutch.
ebo
Posts: 38
Joined: Sun Feb 19, 2006 5:39 pm

Post by ebo »

Create a new project and select "Windows Console Application" and MT-Libs
VagueNess
Posts: 15
Joined: Wed Jan 02, 2008 8:17 pm
Location: Holland

Post by VagueNess »

I still have those two linker errors :(
Sorry for any bad English, I'm Dutch.
Virion
Competition winner
Posts: 2148
Joined: Mon Dec 18, 2006 5:04 am

Post by Virion »

Make sure yo've already link all the library files with your IDE/compiler.
VagueNess
Posts: 15
Joined: Wed Jan 02, 2008 8:17 pm
Location: Holland

Post by VagueNess »

I already did.
Sorry for any bad English, I'm Dutch.
Virion
Competition winner
Posts: 2148
Joined: Mon Dec 18, 2006 5:04 am

Post by Virion »

#pragma comment(lib, "ode.lib")
Not this.
VagueNess
Posts: 15
Joined: Wed Jan 02, 2008 8:17 pm
Location: Holland

Post by VagueNess »

Virion wrote:
#pragma comment(lib, "ode.lib")
Not this.
What do you mean? (Sorry if it's a dumb question, I'm a noob)
Sorry for any bad English, I'm Dutch.
banglocelt
Posts: 1
Joined: Thu Mar 06, 2008 11:00 am

convex.obj link error for ode.lib

Post by banglocelt »

Was this link error ever solved? If so I'd like to know how

Thanks
mokarrabin
Posts: 2
Joined: Sat Oct 11, 2008 1:20 am

Post by mokarrabin »

the way you added the lib is ok. I compiled this earlier with vc2005 with pragma. That is not the problem once your link and lib folders are mentioned right in compiler.

Now I am recompiling the same thing with vc2008 and get 2 error as yours. Dont know what to do.

1>ode.lib(convex.obj) : error LNK2019: unresolved external symbol "public: void __thiscall std::_String_base::_Xran(void)const " (?_Xran@_String_base@std@@QBEXXZ) referenced in function "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > & __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::erase(unsigned int,unsigned int)" (?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@II@Z)


1>ode.lib(convex.obj) : error LNK2019: unresolved external symbol "public: void __thiscall std::_String_base::_Xlen(void)const " (?_Xlen@_String_base@std@@QBEXXZ) referenced in function "protected: bool __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::_Grow(unsigned int,bool)" (?_Grow@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAE_NI_N@Z)
fabietto
Posts: 93
Joined: Wed Sep 24, 2008 4:38 pm
Location: Plymouth, UK
Contact:

Post by fabietto »

Hi everyone,

I'm trying out this example as well. I can compile it without any problem, but unfortunately, after the launch, it exits producing the following output.

85-218-28-148:ODE fruini$ ./ODE_test.app/Contents/MacOS/ODE_test
Irrlicht Engine version 1.7.1
Darwin Kernel Version 10.3.1: Mon Mar 22 15:13:15 PDT 2010; root:xnu-1504.3.52~1/RELEASE_I386
Using renderer: OpenGL 2.1
NVIDIA GeForce GT 330M OpenGL Engine: NVIDIA Corporation
OpenGL driver version is 1.2 or better.
GLSL version: 1.2
Loaded mesh: /Users/fruini/Desktop/ODE/box.x

ODE Message 2: mass must be > 0 in dMassCheck() File mass.cpp Line 49

ODE Message 2: mass must be > 0 in dMassCheck() File mass.cpp Line 49

ODE INTERNAL ERROR 1: assertion "dMassCheck(mass)" failed in dBodySetMass() [ode.cpp]
Abort trap

Any clue?
Brainsaw
Posts: 1177
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Post by Brainsaw »

You have defined a body somewhere, attached a geom to it but didn't define a mass which must not be equal to zero.
Dustbin::Games on the web: https://www.dustbin-online.de/

Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
Post Reply