Problems using OgreODE with Eihort project

PiCroft

08-05-2008 00:34:38

Been looking through the wiki as well as the forums, but I cannot make heads or tails of the information.

Here's the situation:

Using Visual Studio 2005
Using Ogre version Eihort 1.4.7

I've downloaded the latest versions of ODE and OgreODE from CVS. I've also downloaded and installed the prebuilt OgreODE SDK (October 2007 version from here) for completeness sake.

I've made sure my project is able to see the .h files from both ODE and OgreODE. When I try to compile my project I get the following linker errors:
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall OgreOde::World::setAutoSleepAverageSamplesCount(unsigned int)" (__imp_?setAutoSleepAverageSamplesCount@World@OgreOde@@QAEXI@Z)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall OgreOde::World::setAutoSleep(bool)" (__imp_?setAutoSleep@World@OgreOde@@QAEX_N@Z)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall OgreOde::World::setContactCorrectionVelocity(float)" (__imp_?setContactCorrectionVelocity@World@OgreOde@@QAEXM@Z)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall OgreOde::World::setCFM(float)" (__imp_?setCFM@World@OgreOde@@QAEXM@Z)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall OgreOde::World::setERP(float)" (__imp_?setERP@World@OgreOde@@QAEXM@Z)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall OgreOde::World::setGravity(class Ogre::Vector3 const &)" (__imp_?setGravity@World@OgreOde@@QAEXABVVector3@Ogre@@@Z)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class OgreOde::Space * __thiscall OgreOde::World::getDefaultSpace(void)" (__imp_?getDefaultSpace@World@OgreOde@@QAEPAVSpace@2@XZ)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall OgreOde::World::World(class Ogre::SceneManager *)" (__imp_??0World@OgreOde@@QAE@PAVSceneManager@Ogre@@@Z)
1>bin\Release\GameProjBase.exe : fatal error LNK1120: 8 unresolved externals


I've tried using the .h files from both the CVS version and the SDK version. The SDK files date back to 2005 while the CVS are from May 01 or something, so I'm pretty sure the files I want are from the CVS version.

Where am I going wrong?

radsun

08-05-2008 05:49:16

Open project properties->linker->additional dependencies
you need this libs:
OgreMain_d.lib
ois_d.lib
OgreOde_Core_d.lib
OgreOde_Loader_d.lib
OgreOde_Prefab_d.lib

PiCroft

08-05-2008 13:59:06

OgreOde_Core_d.lib
OgreOde_Loader_d.lib
OgreOde_Prefab_d.lib

Where do I find these? They aren't in the CVS, SDK or source zip.

Daerst

08-05-2008 14:05:51

I've also downloaded and installed the prebuilt OgreODE SDK (October 2007 version from here) for completeness sake.
AFAIK there is no prebuilt OgreODE SDK. You should get the sourcecode via SVN and build it yourself. What you build there are the three implied libraries (in Debug mode, without the _d in Release mode).

Bam, wiki!

PiCroft

08-05-2008 14:27:40

cool, what's the svn directory?

I had the CVS version before, is there a difference?

Maybe there should be a sticky showing the directories to use for CVS programs like TortoiseCVS.

Daerst

08-05-2008 14:38:13

https://ogreaddons.svn.sourceforge.net/ ... k/ogreode/

Does CVS still work? I thought they put it down a while ago and just wanted to use, update etc SVN in the future...
But the CVS version should work in the same way - you just have to compile it :P

News: OGRE has moved to Subversion

PiCroft

08-05-2008 14:58:38

Okay, I'm following the wiki tutorial, but it doesn't seem to have anything to do with the versions I downloaded: the directory structure isn't the same and there are entire directories missing which the author apparently had.

Open ogreode/scripts/OgreOde_Source.sln. Visual Studio complains that ode_Source.vcproj is missing. Remove it from the projects list in the Solution Explorer and add ogreode/ode/build/vs2005/ode.sln afterwards. Then rightclick OgreOde_Core, click Project Dependencies, mark ode and click OK.

I don't have the directory in bold. In fact I don't have an ode.sln anywhere in any of the version I downloaded. :(

Daerst

08-05-2008 16:31:03

Did you download ODE 0.9 from the ODE website?

PiCroft

08-05-2008 20:15:13

Yup. ode-0.9 is what I got.

<oops, put 9.0 instead of 0.9 :oops: >

HiZed

08-05-2008 20:27:06

I'm trying to compile OgreODE with Eihort SDK, too.
I followed the tutorial, I founded ode.sln in ode-src-0.9.zip.
But, when I compile I got a lot of error, function already defined in ode.lib

PiCroft

09-05-2008 16:15:41

Um, is there any help available with this issue?

I have tried unsuccessfully to compile this twice now, and been working for almost a full week trying to integrate ODE and then OgreODE into the project. If the instructions given for compiling OgreODE are incorrect, how am I supposed to use it?

rewb0rn

09-05-2008 16:23:21

well we are not supposed to do anything, in fact we're also just users who share their experiences and noone helped us back then so please be a little more kind here :)

About your problem:
If you downloaded ode 0.9 from the website, you would have the ode.sln file in there. Search it. If you extracted ode from their svn (www.ode.org) to the folder ogreode/ode you would surely have that directory mentioned in the tutorial.

rewb0rn

09-05-2008 16:25:28

I'm trying to compile OgreODE with Eihort SDK, too.
I followed the tutorial, I founded ode.sln in ode-src-0.9.zip.
But, when I compile I got a lot of error, function already defined in ode.lib


Please elaborate, maybe you should create a new topic because its a different issue.

PiCroft

09-05-2008 16:35:23

Apologies, I'm just frustrated is all. :(

As it turns out, I've downloaded the wrong ode-0.9. I downloaded the win32 zip which has a lot less stuff in it. I just tried the ode-src-0.9 from here and it has the .sln.

I think I now know why programmers burn out so fast :cry:

Again, apologies.