Help needed with OgreOde compiling with CodeBlocks

Oozie

22-01-2007 17:35:30

I was able to install Ogre 1.2.4 and compile and view its tutorials succesfully.

Now I'm trying to compile OgreODE with Codeblogs. I have Ode 0.7 and OgreOde_SourceSDK_Setup.exe installed.

I start CodeBlocks with \OgreOde\scripts\CodeBlocks\OgreOde_SDK.workspace script. When I try to build the workspace, the compiling stops at the following error when compiling a project named "ode":

F:\OgreOde\ode\build\codeblocks\..\..\ode\src\collision_kernel.cpp:1089: undefined reference to `opcode_collider_cleanup()'

This function seems to be defined in "collision_trimesh_opcode.cpp", but when I try to include this file in to the project, I just get more trouble with error messages:
F:/OgreOde/ode/build/codeblocks/../../ode/src/collision_trimesh_opcode.cpp:561: multiple definition of `dxTriMesh::~dxTriMesh()'

Can someone help me with this?

Oozie

22-01-2007 21:37:14

Using the files from OgreOde_Source_Setup.exe I'm able to avoid the problem described in the previous message, but I just run in to new strange build problems.

Has anyone been able to build OgreOde with the provided CodeBlocks scripts? I appreciate any information on this.

gugus

23-01-2007 16:20:37

you should importe VC8 scripts.

Oozie

23-01-2007 20:35:44

Thanks for the reply gugus!
I'm not sure which VC8 script to import... I tried the OgreOde_SDK "solution".

Have you tried this yourself gugus? These scripts, interpreted by CodeBlocks, are trying to create folders like Release|Win32, which causes post-compilation problems, because folders with |-symbol aren't allowed.

Well, long story short, I replaced all the "|Win32" strings in ALL THE FILES into "Win32".

Even with this setup I still get linking problems (even though I think all my settings _should_ be ok):

..\..\obj\DebugWin32\src\OgreOdeDebugObject.o: In function `ZN7OgreOde10DebugLinesC2Ev':
F:/OgreOde/scripts/VC8/../../src/OgreOdeDebugObject.cpp:12: undefined reference to `non-virtual thunk to Ogre::SimpleRenderable::getMaterial() const'


Please, there has to be someone who has gotten this to work with CodeBlocks!

luis

24-01-2007 08:38:30

If you want i can link a zip with all .vcproj and .sln (version : [12 january 2007) to compile with the Ogre's source version and the collision_kernel.cpp modified to compile.

Those .vcproj have also the correct dependencies between the projects to make a batch build with no errors ;)
I sent to Tuan those files, but seems he is busy.

gugus

24-01-2007 12:16:00

Yes i did it myself.Code::block scripts didn't work too.

So you should (with the old SDK,I don't know if it is the same with the new one.I don't download it yet)import from VC8 and build:
-tynxml(i did not have any trouble with this one).
-ODE/build/vs2005/Ode_SDK
-scripts/VC8/OgreOde_Core_SDK
-prefab/scripts/VC8/OgreOde_Prefabs_SDK

There is somthing more in the new version.You will have to importe something like OgreOde_Loader_SDK,but i am not sure of this.

Don't forgot to copy the dll created in OgreSDK/bin/(debug\realease).

I hope it will help you.

Oozie

24-01-2007 16:12:09

Thanks for the reply guys!
Yes Luis, I'd appreciate if you could share your files!
Meanwhile I try to follow gugus' advice.

Gugus: To be clear, did you also have to change all the "|Win32" substrings into "Win32" from the scripts? Or are the scripts different in the old version?
Also, what dll I should copy from where into where?
I try to find some old versions and try compiling those.

gugus

24-01-2007 16:37:40

I have just download and compile the new version.

you have to importe ode\build\vc2003 project and compile it.(all modes)
After you have to importe the project from VC8 OgreOde_Core
there are 2 libode.a.You have to linck theme BOTH if you want the project to compile fine.

If it don't work,i can send you by email my compiled version.

Oozie

24-01-2007 18:01:19

gugus,
Did you get this?
http://tuan.kuranes.free.fr/OgreOde.zip

Or which version are you referring to?

I have so many open questions to you, concerning how you excatly did it with CodeBlocks (with modes, do you mean build targets? Did you use OgreOde_Core_SDK.vcproj or OgreOde_Core_Source.vcproj VC8 script file?).

I couldn't get it to work. If you could, please send your compilation to REMOVEtmtakala (at) REMOVEgmail (dot) com
I believe that gmail can take only 10 megs per email.

gugus

24-01-2007 18:30:31

I took both to compile it(zip and installer).But i did not really remember how i did but i know it is very long and boring.It is largely isier if you send me your email by MP and I send you compiled DLL.But if you really want to compile,the best way is to try all files.

luis

24-01-2007 21:32:27

ok, here is:
(20Kb)
http://www.gerwalk.net/downloads/ogreod ... ry2007.zip
vproj+sln Visual studio 2005/ Express, Ogre source

hope this helps someone ;)

Oozie

25-01-2007 18:29:05

Thank you luis! I'm now trying to compile with your scripts.
It seems that I'm missing OgreMain.lib. I do have OgreMain.dll, but this doesn't seem to compensate.

I have now tried both CodeBlocks and VS2005. Running those scripts with VS2005 it says that "Can't find OgreMain.lib". CodeBlocks appears to link OgreMain.dll instead of OgreMain.lib. But then I get these kind of errors:
F:/OgreOde/prefab/scripts/VC8/../../src/OgreOdeVehicle.cpp:302: undefined reference to `Ogre::StringConverter::toString(unsigned int, unsigned short, char, std::_Ios_Fmtflags)'

OgreMain.lib is not included in any of the Ogre SDK packages available from Ogre's website. Is it necessary for me to build also Ogre from the source?

I'm very confused now. Please help me to find the way here. I'm anxious to get to use OdeOgre.

luis

25-01-2007 19:41:28

OgreMain.lib is not included in any of the Ogre SDK packages available from Ogre's website. Is it necessary for me to build also Ogre from the source?


absolutely yes :)
There is a lot of .sln in OgreOde, the ones i've fix are exclusive for Ogre's sources, so you have to compile it ;)
also you have to unzip the OgreOde.zip to have something like this:

ogre-win32-v1-2-5\ogrenew
ogre-win32-v1-2-5\ogrenew\OgreOde

OgreOde must be in the same level as ogrenew.

good luck!

Oozie

26-01-2007 19:56:40

Thanks luis! With your scripts I was able to build everything and produce OgreOdeDemo_SimpleScenes.exe using VS2005.
When I try to start it, it complains about missing ode.dll, so it seems to be a linking problem...

By the way, I have two targets... Release and ReleaseDLL. Should they both work?

I will try to fix this, but with my limited compiling experience I really appreciate all tips!

luis

27-01-2007 09:24:37

Thanks luis! With your scripts I was able to build everything and produce OgreOdeDemo_SimpleScenes.exe using VS2005.
great !
When I try to start it, it complains about missing ode.dll, so it seems to be a linking problem...

no, you only link with .lib files, the problem is the application cant find the Ode.dll.
The .vcproj for Ode wont copy the dll to your release directory, you must do it manually.

look in:
ogrenew\OgreOde\ode\lib\releasedll
ogrenew\OgreOde\ode\lib\debugdll
By the way, I have two targets... Release and ReleaseDLL. Should they both work?
release/debug DLL ;)

vmatikainen

27-01-2007 11:04:43

In OgreOde loader I had this strangest error with lots of warning about some functions have been defined prior in the dllimport or something like that and it resulted in undefined references to many functions.

The reason for that was OGREODEEXPORT_LOADER
was defined in build options of imported vc-project as OGREODEEXPORT_Loader.

But eventually I got working combination of Latest ogre SDk Dagon 1.2.5, latest Codeblocks nightly build. OgreOdeSource_sdk from tuan site with latest ode 0.8.0 Rc1 from sourceforge. Ode and Tinyxml went well with premake and codeblocks and for the rest of the projects I mainly imported the *source.vcproject files and removed all references to WIN32 in names and directories and added some additional directories and linkages.

Kudos to all, this thread has been of great help.

- Vikke

Oozie

28-01-2007 19:05:32

I got it to work with VS2005! With luis' files and help I succeeded.

Interestingly I still had to change one directory path definition in SimpleScenesApplication.h, which had an incorrect path to the Media directory.

I wasn't able to compile it with CodeBlocks however. I tried importing the VC scripts and using the original CodeBlocks scripts, but I kept having these kind of errors:
-------------- Build: Release in OgreOde_Core ---------------
Linking dynamic library: ..\..\lib\Release\OgreOde_Core.dll
..\..\obj\Release\src\OgreOdeBody.o:OgreOdeBody.cpp:(.text+0x2fd): undefined reference to `Ogre::Quaternion::operator-(Ogre::Quaternion const&) const'

But I'm satisfied with the successful VS2005 compilation. Now I'll see what I can do with the prefab ragdoll.