Page 1 of 2

Problem with ODE/Irrlicht tutorial

Posted: Wed Jan 30, 2008 4:20 pm
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.

Posted: Wed Jan 30, 2008 4:27 pm
by MasterGod
Be sure to link the ODE's lib too.

Posted: Wed Jan 30, 2008 4:30 pm
by VagueNess
I already did that

Code: Select all

#pragma comment(lib, "ode.lib")
Thanks anyway

Posted: Wed Jan 30, 2008 5:06 pm
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.

Posted: Wed Jan 30, 2008 5:50 pm
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...

Posted: Wed Jan 30, 2008 7:21 pm
by ebo
Create a new project and select "Windows Console Application" and MT-Libs

Posted: Sat Feb 02, 2008 10:51 am
by VagueNess
I still have those two linker errors :(

Posted: Sat Feb 02, 2008 11:13 am
by Virion
Make sure yo've already link all the library files with your IDE/compiler.

Posted: Sat Feb 02, 2008 11:18 am
by VagueNess
I already did.

Posted: Sat Feb 02, 2008 2:31 pm
by Virion
#pragma comment(lib, "ode.lib")
Not this.

Posted: Sat Feb 02, 2008 2:42 pm
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)

convex.obj link error for ode.lib

Posted: Thu Mar 06, 2008 11:03 am
by banglocelt
Was this link error ever solved? If so I'd like to know how

Thanks

Posted: Tue Feb 16, 2010 12:39 pm
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)

Posted: Tue May 18, 2010 11:37 pm
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?

Posted: Wed May 19, 2010 7:58 am
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.