can't compile anything!!...

paulm12

11-10-2006 19:52:59

Sorry to make my first post a help request! When trying to compile any of the nxOgre tutorial's I am getting errors. For example when compiling tutorial 104 i get the following:
------ Build started: Project: test, Configuration: Debug Win32 ------
Compiling...
104.cpp
Linking...
104.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class nxOgre::body * __thiscall nxOgre::scene::createBody(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class nxOgre::shape *,float,class Ogre::Vector3)" (__imp_?createBody@scene@nxOgre@@QAEPAVbody@2@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0PAVshape@2@MVVector3@Ogre@@@Z) referenced in function "public: virtual void __thiscall tutorial::createScene(void)" (?createScene@tutorial@@UAEXXZ)
104.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall nxOgre::convexShape::convexShape(class std::vector<class Ogre::Vector3,class std::allocator<class Ogre::Vector3> >,int,class nxOgre::material *,class Ogre::Vector3)" (__imp_??0convexShape@nxOgre@@QAE@V?$vector@VVector3@Ogre@@V?$allocator@VVector3@Ogre@@@std@@@std@@HPAVmaterial@1@VVector3@Ogre@@@Z) referenced in function "public: virtual void __thiscall tutorial::createScene(void)" (?createScene@tutorial@@UAEXXZ)
104.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall nxOgre::material::setDynamicFrictionV(float)" (__imp_?setDynamicFrictionV@material@nxOgre@@QAEXM@Z) referenced in function "public: virtual void __thiscall tutorial::createScene(void)" (?createScene@tutorial@@UAEXXZ)
104.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall nxOgre::material::setStaticFrictionV(float)" (__imp_?setStaticFrictionV@material@nxOgre@@QAEXM@Z) referenced in function "public: virtual void __thiscall tutorial::createScene(void)" (?createScene@tutorial@@UAEXXZ)
104.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class nxOgre::material * __thiscall nxOgre::scene::createMaterial(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,float,float,float)" (__imp_?createMaterial@scene@nxOgre@@QAEPAVmaterial@2@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MMM@Z) referenced in function "public: virtual void __thiscall tutorial::createScene(void)" (?createScene@tutorial@@UAEXXZ)
104.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall nxOgre::material::setDynamicFriction(float)" (__imp_?setDynamicFriction@material@nxOgre@@QAEXM@Z) referenced in function "public: virtual void __thiscall tutorial::createScene(void)" (?createScene@tutorial@@UAEXXZ)
104.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall nxOgre::material::setStaticFriction(float)" (__imp_?setStaticFriction@material@nxOgre@@QAEXM@Z) referenced in function "public: virtual void __thiscall tutorial::createScene(void)" (?createScene@tutorial@@UAEXXZ)
104.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall nxOgre::material::setBounce(float)" (__imp_?setBounce@material@nxOgre@@QAEXM@Z) referenced in function "public: virtual void __thiscall tutorial::createScene(void)" (?createScene@tutorial@@UAEXXZ)
104.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall nxOgre::scene::hasFloor(bool)" (__imp_?hasFloor@scene@nxOgre@@QAEX_N@Z) referenced in function "public: virtual void __thiscall tutorial::createScene(void)" (?createScene@tutorial@@UAEXXZ)
104.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall nxOgre::scene::hasGravity(class Ogre::Vector3)" (__imp_?hasGravity@scene@nxOgre@@QAEXVVector3@Ogre@@@Z) referenced in function "public: virtual void __thiscall tutorial::createScene(void)" (?createScene@tutorial@@UAEXXZ)
104.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class nxOgre::scene * __thiscall nxOgre::world::createScene(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (__imp_?createScene@world@nxOgre@@QAEPAVscene@2@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function "public: virtual void __thiscall tutorial::createScene(void)" (?createScene@tutorial@@UAEXXZ)
104.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall nxOgre::world::world(class Ogre::Root *,class Ogre::SceneManager *,bool)" (__imp_??0world@nxOgre@@QAE@PAVRoot@Ogre@@PAVSceneManager@3@_N@Z) referenced in function "public: virtual void __thiscall tutorial::createScene(void)" (?createScene@tutorial@@UAEXXZ)
104.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall nxOgre::world::frameStarted(struct Ogre::FrameEvent const &)" (?frameStarted@world@nxOgre@@UAE_NABUFrameEvent@Ogre@@@Z)
104.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall nxOgre::world::debug(bool)" (__imp_?debug@world@nxOgre@@QAEX_N@Z) referenced in function "public: virtual void __thiscall tutorial::checkInput(void)" (?checkInput@tutorial@@UAEXXZ)
104.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall nxOgre::body::addForce(class Ogre::Vector3,enum NxForceMode)" (__imp_?addForce@body@nxOgre@@QAEXVVector3@Ogre@@W4NxForceMode@@@Z) referenced in function "public: virtual void __thiscall tutorial::checkInput(void)" (?checkInput@tutorial@@UAEXXZ)
104.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall nxOgre::world::~world(void)" (__imp_??1world@nxOgre@@UAE@XZ) referenced in function "public: virtual void * __thiscall nxOgre::world::`scalar deleting destructor'(unsigned int)" (??_Gworld@nxOgre@@UAEPAXI@Z)
104.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall ControllerManager::ControllerManager(void)" (__imp_??0ControllerManager@@QAE@XZ) referenced in function "void __cdecl nxOgre::`dynamic initializer for 'mControlMgr''(void)" (??__EmControlMgr@nxOgre@@YAXXZ)
104.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall ControllerManager::~ControllerManager(void)" (__imp_??1ControllerManager@@QAE@XZ) referenced in function "void __cdecl nxOgre::`dynamic atexit destructor for 'mControlMgr''(void)" (??__FmControlMgr@nxOgre@@YAXXZ)
MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup
bin\Debug\test.exe : fatal error LNK1120: 19 unresolved externals
Build log was saved at "file://c:\Documents and Settings\Paul\My Documents\Visual Studio 2005\Projects\test\obj\Debug\BuildLog.htm"
test - 20 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


Thanks for any help offered...

betajaen

11-10-2006 19:57:39

Hmm, just sounds like a path issue. Your using the CVS I assume?

Did you setup the environmental variables for NXOGRE_DIR, PHYSX_DIR and OGRE_HOME?

[Edit]

If you want to wait until Friday; 0.4 RC1 is released then.

paulm12

11-10-2006 20:08:34

Thnaks for the reply... environment variables are

NXOGRE_DIR c:\nxogre\Nxogre

OGRE_HOME c:\OgreSDK

PHYSX_DIR C:\Program Files\AGEIA Technologies\AGEIA Physx SDK\v2.5.1

I am using NxOgre.0.5.preview.3.zip

cheers...

betajaen

11-10-2006 20:12:57

Oh Debug...

Your compiling it in Debug. Compile it as release.

Also I noticed your using 2.5.1 did NxOgre Preview 3 compile alright with it?

paulm12

11-10-2006 20:17:06

I'm still getting the same errors... I haven't compiled anything succesfully yet... I'm doing this for a final year project, I have to use Ogre and nxOgre/physx... so do you think a version previous to 2.5.1 would be better??? The more stable the better really!

cheers

betajaen

11-10-2006 20:23:46

Okay, because it's for a final year project:

http://get.nxogre.org/0.4/NxOgre04preview1.zip

Thats a Sept-25 version for you. I know it works with 2.5.1 (when it compiles you get a few errors regarding some NX_ things, just comment them. And a few lines of fluids. Comment them out too.)

All I can say is, make sure NxOgre and Ogre are compiled as release and the environmental variables are set.

Else RC1 is coming out on Friday.

p.s. Your required to use NxOgre for a final year project? That is so cool!

paulm12

11-10-2006 20:30:32

Thanks very much... will try this...

wspnut

13-10-2006 03:35:37

I'm having the exact same problem. I *just* installed the same version of physx and the latest nxogre.

However, when I try and build NxOgre, this is my output:


------ Build started: Project: nxOgre, Configuration: Release Win32 ------

Compiling...
nxPrefab_vehicle.cpp
nxPrefab_rope.cpp
nxPrefab_ragdoll.cpp
nxPrefab_prefab.cpp
nxPrefab_levitator.cpp
nxOgre_world.cpp
nxOgre_util_stream.cpp
nxOgre_trigger.cpp
nxOgre_stateMachine.cpp
nxOgre_shape.cpp
nxOgre_scene.cpp
\NxOgre\src\nxOgre_scene.cpp(59) : error C2039: 'collisionDetection' : is not a member of 'NxSceneDesc'
\Novodex\SDKs\Physics\include\NxSceneDesc.h(231) : see declaration of 'NxSceneDesc'
nxOgre_rayCaster.cpp
nxOgre_particleEmitter.cpp
nxOgre_material.cpp
nxOgre_joint.cpp
nxOgre_debugNode.cpp
nxOgre_controllable.cpp
nxOgre_character.cpp
nxOgre_body.cpp
Generating Code...

nxOgre - 1 error(s), 0 warning(s)


---------------------- Done ----------------------

Build: 0 succeeded, 1 failed, 0 skipped


Using C++ .NET 2003.

I have modified all of the includes and libraries in the NxOgre engine to use my OGRE_HOME environment variable (for some resaon it was hardlinked...).

I have all 3 of my system variables set as well.

Any ideas?


EDIT 1: I just saw the FAQ about that one error... I'm fixing that now and I'll get back to ya.

EDIT 2: I recompiled, one error is gone, the other still remains. Again, any ideas? I've updated the results above.

betajaen

13-10-2006 09:28:46

If it's the collision detection line you can just comment it out, it's not used anymore in the later SDK's.

wspnut

13-10-2006 15:04:59

k, I commented out that line, and added the ../NxOgre/lib directory to my build paths... (it wasn't there for some reason). NxOgre seemed to compile fine, so I copied the DLL to my bin directory.

Compiling the 2nd tutorial, I get this however:


Linking...
MSVCRT.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function _WinMainCRTStartup
..\bin\Release/ohBalls.exe : fatal error LNK1120: 1 unresolved externals