Problems compiling with Code::Blocks
Apache81
12-02-2007 16:35:42
Hi guys, I'm trying to compile OgreODE with the Code::Blocks script I found in the pack but I got this error:
collision_kernel.cpp:1089: undefined reference to `opcode_collider_cleanup()'
Can anyone try to explain why the compiler generatw this error?
THANKS GUYS !!!!
Apache81
12-02-2007 16:44:23
Ok... i will be more specific 'cause I read only now the other thread about issues with Code::Blocks.
I CANNOT use VisualStudio !!!
I need to compile it with GNU GCC 'cause I'm developing a Ogre project with Code::Blocks and GNU GCC and all the code I wrote will not work with VisualStudio compiled dll.
How could I do?
I got similar problems with OgreAL (linker failure 'cause vorbis and ogg are VisualStudio compiled)
Oozie
13-02-2007 12:35:12
This is the file I got from luis:
http://users.tkk.fi/~tmtakala/ogreode_s ... ry2007.zip
If you use those files, the `opcode_collider_cleanup()' problem *should* go away. Please note that even after that, there will be other problems with CodeBlocks compiling... I think you need to modify heavily the .workspace provided with OgreOde. I never could compile OgreOde with CodeBlocks...
Apache81
13-02-2007 13:59:52
Thanks Oozie... I hope I can solve those problems.
Thanks again !!!
Apache81
21-02-2007 10:53:57
Hi guys... I decided to use Visual Studio 'cause I'm not able to compile OgreOde with Code::Blocks (I make my own scipts but it seems there's nothing to do !!!) but I cannot compile because the following errors occur while compiling OgreOde_Core: the external symbols needed from ode and ogremain libs are not resolved.
I've to say 2 other things:
1) when I compile the ode lib I get a static .lib file but not .dll because the project has set so... it's normal? Anyway the linker seems to not recognize the library:
error LNK2019: external symbol reference "void __cdecl
opcode_collider_cleanup(void)"
(?opcode_collider_cleanup@@YAXXZ) not resolved in function
_dCloseODE ode.lib
2) I'm using pre-compiled Ogre SDK for VS8 version 1.2.5 and if I point to directory that contains del OgreMain.dll the linker say that is not able to find OgreMain.lib, but if I point to directory that contains OgreMain.lib, I get errors like this:
error LNK2001: external symbol _dBodyIsEnabled not resolved
OgreOdeSpace.obj
I've also tried to use the files Oozie posted, but I'm still not able to compile the solution.
Anyone have ideas about it?
rewb0rn
21-02-2007 13:35:10
but I cannot compile because the following errors occur while compiling OgreOde_Core: the external symbols needed from ode and ogremain libs are not resolved.
Which solution do u use? try ogreode_sdk
1) when I compile the ode lib I get a static .lib file but not .dll because the project has set so... it's normal? Anyway the linker seems to not recognize the library:
error LNK2019: external symbol reference "void __cdecl
opcode_collider_cleanup(void)"
(?opcode_collider_cleanup@@YAXXZ) not resolved in function
_dCloseODE ode.lib
set build configuration to debug dll or release dll
cannot imagine why there is an unresolved symbol though. are you sure your ode version matches your ogreode version? in addition, as far as i remember, there will be built 2 different lib files, 1 in debug dll folder and one in debug lib folder or something like this, be sure you use the one from debug lib (the other one is much smaller)
2) I'm using pre-compiled Ogre SDK for VS8 version 1.2.5 and if I point to directory that contains del OgreMain.dll the linker say that is not able to find OgreMain.lib, but if I point to directory that contains OgreMain.lib, I get errors like this:
error LNK2001: external symbol _dBodyIsEnabled not resolved
OgreOdeSpace.obj
this has nothing to do with the ogre sdk, dBodyIsEnabled is part of ode and its not resolved in the ogreode project, might be again a version conflict or the wrong lib.
tuan kuranes
24-02-2007 11:37:16
Ode version in OgreODe download is a modified one, so that shows you're not linking against the good lib.
You can either link to the good one or erase the one that comes with OgreODe
rewb0rn
24-02-2007 11:47:45
That means the ode version coming with ogreode is not compatible to ogreode? Why dont you put in the correct version? Problem is its sometimes very tricky to find out which version is the right one. You know the sdk problem from the other thread, i already tried that with latest ode version, but i wasnt able to compile, appearantly due to version conflicts.
tuan kuranes
24-02-2007 13:26:28
it's a correct version. Problem arise when you compile against a ODE version (let's call it A ) and link against another ODE version (let's call it B).
If A and B are the same all is ok, but if not then you're in trouble.
rewb0rn
24-02-2007 14:00:09
ok so that should not be the problem, thx
Apache81
09-03-2007 10:03:45
Sorry for long time away but I got something else to resolve.
From your answers I deduce that I'm using different versions of ODE (so not Ogre or OgreODE). I have the OgreOde version downloaded from main site, so, how could I check the ODE version I have? Or, how I could have the same version for ODE and OgreODE so I can compile the lib?
Thanks for your help !!!
rewb0rn
09-03-2007 14:08:19
I mentioned it somewhere before, I was not able to work with the latest ogreode version from the main page. Now I downloaded both OgreOde and ode from cvs and everything works fine. (you always have to trick around with the solutions and project settings when you compile but you get used to it

)
Apache81
09-03-2007 14:36:31
thank you very much !!!
i'll try it and i'll let you know when i'll do something.
THANKS AGAIN !!!
rewb0rn
09-03-2007 15:09:44
yeye dont make it such a big deal

Note that you have to download ode from svn from their very own site:
http://www.ode.org/
gugus
11-03-2007 18:09:14
Hello.If you want to compile with code::block,you have to importe the VC2003 project of ODE.
Apache81
12-03-2007 12:18:56
Ok guys... I have more problems (isn't that too boring?). This time I got the following errors while I'm trying to compile the OgreOde lib:
Error 1 error C2660: 'Ogre::Material::setDepthBias': the function doen't accept 2 arguments \ogreode\src\ogreodedebugcontact.cpp 186
Error 2 error C2660: 'Ogre::Material::setDepthBias': the function doen't accept 2 arguments \ogreode\src\ogreodedebugcontact.cpp 257
Error 3 error C2039: 'UVRect': is not a member of 'Ogre::Font' \ogreode\src\ogreodedebugcontact.cpp 385
Error 4 error C4430: missing identifier type, will be used int. Note: default-int isn't no more supported by C++ \ogreode\src\ogreodedebugcontact.cpp 385
Error 5 error C2143: syntax error: missing ';' before '&' \ogreode\src\ogreodedebugcontact.cpp 385
Error 6 error C2065: 'uvRect': identifier not declared \ogreode\src\ogreodedebugcontact.cpp 385
Error 7 error C2660: 'Ogre::Font::getGlyphTexCoords': the function doesn't accept 1 argument \ogreode\src\ogreodedebugcontact.cpp 385
and so on (the others errors depend by incorrect declaration of line 385). I think that the problem now is OGRE, isn't it? How could I solve these issues?
Sorry to bore you such a lot of times !!!
Apache81
12-03-2007 12:21:14
Hello.If you want to compile with code::block,you have to importe the VC2003 project of ODE.
Thank you, gugus, but I did it and I was not able to compile the VS script with the GNU-GCC compiler (and you can also understand why

).
I wold to thank you anyway !!!
gugus
12-03-2007 16:48:01
hello.I just solve this problemes.
I just remove line 186.It works.
You will have to put this:
Real horiz_height = mpFont->getGlyphAspectRatio(*i);
Real u1, u2, v1, v2;
Ogre::TRect<Ogre::Real> Rect = mpFont->getGlyphTexCoords(*i);
u1 = Rect.bottom;
u2 = Rect.top;
v1 = Rect.left;
v2 = Rect.right;
at line 386.If it do not work,i can send you GCC DLLs.
Hope it helps.
Apache81
15-03-2007 10:31:16
Thank you gugus !!!
One more think: I get an error for
Ogre::TRect<Ogre::Real> Rect = mpFont->getGlyphTexCoords(*i);
Error 1 error C2660: 'Ogre::Font::getGlyphTexCoords': the function doesn't accept 1 argument OgreOde\src\OgreOdeDebugContact.cpp 390
I saw the Ogre API's reference but this function need a code point id, so, now, I don't know what to do.
Please, I would to undestand: where is the problem? I'm very confused
gugus
15-03-2007 18:12:40
I think you should re-install OgreSDK eightort.
If it do not solve the probleme,i don't know what to do.
Apache81
19-03-2007 07:44:05
I'm not using Eihort but the 1.2.5 version !!!
I didn't know that the latest version of OgreODE must be used with Eihort.
I'll try right know by installing the new OGRE SDK.
I'll make you know.
THANKS !!!