linking error

dynamyt

25-02-2006 12:57:10

hey,

im trying to compile OgreNewt for the first time, im getting these linking errors -

1> Creating library lib\Debug_DLL\OgreNewt_Main_d.lib and object lib\Debug_DLL\OgreNewt_Main_d.exp

1>OgreNewt_Debugger.obj : error LNK2019: unresolved external symbol "public: void __thiscall Line3D::drawLines(void)" (?drawLines@Line3D@@QAEXXZ) referenced in function "public: void __thiscall OgreNewt::Debugger::showLines(class OgreNewt::World *)" (?showLines@Debugger@OgreNewt@@QAEXPAVWorld@2@@Z)
1>OgreNewt_Debugger.obj : error LNK2019: unresolved external symbol "public: __thiscall Line3D::Line3D(void)" (??0Line3D@@QAE@XZ) referenced in function "public: void __thiscall OgreNewt::Debugger::showLines(class OgreNewt::World *)" (?showLines@Debugger@OgreNewt@@QAEXPAVWorld@2@@Z)

1>OgreNewt_Debugger.obj : error LNK2019: unresolved external symbol "public: void __thiscall Line3D::addPoint(class Ogre::Vector3 const &)" (?addPoint@Line3D@@QAEXABVVector3@Ogre@@@Z) referenced in function "private: static void __cdecl OgreNewt::Debugger::newtonPerPoly(struct NewtonBody const *,int,float const *,int)" (?newtonPerPoly@Debugger@OgreNewt@@CAXPBUNewtonBody@@HPBMH@Z)

1>lib\Debug_DLL\OgreNewt_Main_d.dll : fatal error LNK1120: 3 unresolved externals

im using vc8 and the OgreSDK to compile with.

thanks :)

Dynamyt / Tegro (irc)

walaber

25-02-2006 17:57:11

please read the documentation about OgreNewt::Debugger. you need to include Line3D.cpp (in ogrenewt/demos/include). it is done this way because with the release of Dagon, hopefully we will be able to remove the line3d stuff and just use ManualObject.

abhinavxrai

27-02-2006 05:57:04

I found a nice neat little tutorial on how to setup OgreNewt without any problems.

The tutorial is on the wiki and can be found here.

Evak

09-04-2006 10:58:59

I'm having the same problem here in Dagon. Spent about 3 days trying to get this compile and this is all I have left.

Creating library Debug\OgreMax.lib and object Debug\OgreMax.exp

OgreNewt_Main_d.lib(OgreNewt_Debugger.obj) : error LNK2019: unresolved external symbol "public: void __thiscall Line3D::drawLines(void)" (?drawLines@Line3D@@QAEXXZ) referenced in function "public: void __thiscall OgreNewt::Debugger::showLines(class OgreNewt::World *)" (?showLines@Debugger@OgreNewt@@QAEXPAVWorld@2@@Z)

OgreNewt_Main_d.lib(OgreNewt_Debugger.obj) : error LNK2019: unresolved external symbol "public: __thiscall Line3D::Line3D(void)" (??0Line3D@@QAE@XZ) referenced in function "public: void __thiscall OgreNewt::Debugger::showLines(class OgreNewt::World *)" (?showLines@Debugger@OgreNewt@@QAEXPAVWorld@2@@Z)

OgreNewt_Main_d.lib(OgreNewt_Debugger.obj) : error LNK2019: unresolved external symbol "public: void __thiscall Line3D::addPoint(class Ogre::Vector3 const &)" (?addPoint@Line3D@@QAEXABVVector3@Ogre@@@Z) referenced in function "private: static void __cdecl OgreNewt::Debugger::newtonPerPoly(struct NewtonBody const *,int,float const *,int)" (?newtonPerPoly@Debugger@OgreNewt@@CAXPBUNewtonBody@@HPBMH@Z)

Debug\OgreMax.dll : fatal error LNK1120: 3 unresolved externals

Build log was saved

at "file://c:\programming\Aurora\Debug\BuildLog.htm"

OgreMax - 4 error(s), 8 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========


The thing is, I have been searching all the forums and as far as I can tell have linked everything.

Here's my include dirs:

\ogrenew\Tools\XMLConverter\include
\ogrenew\Samples\Common\include
\ogrenew\Dependencies\include
\ogrenew\OgreMain\include
\ogrenew\Samples\Common\CEGUIRenderer\include
\ogrenew\Dependencies\include\CEGUI
\ogreaddons\ogrenewt\OgreNewt_Main\inc
\ogreaddons\ogrenewt\demos\Include
\NewtonSDK\sdk

Here's my libs dirs

\ogrenew\Dependencies\lib\Debug
\ogrenew\OgreMain\lib\Debug
\NewtonSDK\sdk\dll
\ogrenew\Samples\Common\CEGUIRenderer\lib
\ogreaddons\ogrenewt\OgreNewt_Main\lib\debug

My Dependencies

OgreMain_d.lib
CEGUIBase_d.lib
OgreGUIRenderer_d.lib
Newton.lib
OgreNewt_Main_d.lib


Seems to be a line3d.h file, but I really can't see anything wrong. I've started building the project many many times and it always stubles on this last bit.

Any help would be great, as far as I can tell this is the last problem I have with building our Dagon project in VC2005.

Hmmm, maybe I should have started a new thread, but it seems to be the same problem.

abhinavxrai

09-04-2006 11:02:20

I'm not an expert at this, but usually it helps if you post your Ogre.log file too. THen we'll know what exactly is the problem :lol:

walaber

09-04-2006 19:52:49

you need to include "Line3D.cpp" into your project, so it gets compiled. you can find Line3d.cpp in ogrenewt/demos/include.

Evak

09-04-2006 23:04:21

figured it out thank's. I'm a complete newbie to C++ figured you just added the dir's and that was it. Didn't realise you have to add the existing .cpp files manualy for them to compile with your project.

Anyway thats that sorted, got ogrenewt and ofusion scene loader working in our Ogre wrapper for Blitzmax now :)