problem with NxOgre::Terrain

the0bit1

29-06-2008 17:33:26

hi!
when i try build this code --
// main.cpp
...
NxOgre::Terrain* terr =new NxOgre::Terrain( "hello", NxOgre::float3( 2, 1, 2));
...

i get this err-mess --
------ Build started: Project: physx, Configuration: Release Win32 ------
Compiling...
main.cpp
Linking...
Creating library D:/DEV/OGRE/OgreSDK//bin/Release\physx.lib and object D:/DEV/OGRE/OgreSDK//bin/Release\physx.exp
main.obj : error LNK2019: unresolved external symbol "public: __thiscall NxOgre::Terrain::Terrain(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class Betajaen::Vector3<float>,class NxOgre::ShapeParams const &,class NxOgre::TerrainParams const &)" (??0Terrain@NxOgre@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$Vector3@M@Betajaen@@ABVShapeParams@1@ABVTerrainParams@1@@Z) referenced in function "protected: virtual void __thiscall MyApplication::createScene(void)" (?createScene@MyApplication@@MAEXXZ)
D:/DEV/OGRE/OgreSDK//bin/Release\physx.exe : fatal error LNK1120: 1 unresolved externals
Build log was saved at "file://d:\DEV\helloogre\physx\Release\BuildLog.htm"
physx - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

and what is it?!

betajaen

29-06-2008 17:50:25

You haven't linked to NxOgre.lib/NxOgre_d.lib, and you need to attach that terrain (which is a shape I may add) to an Actor.

the0bit1

29-06-2008 20:39:30

You haven't linked to NxOgre.lib/NxOgre_d.lib, and you need to attach that terrain (which is a shape I may add) to an Actor.

n0-n0-n0!!! it's too simple

this err i get when using terrain( only) --

this code --good
...
NxOgre::World* mWorld =new NxOgre::World( "time-controller: ogre");
NxOgre::Scene* mScene =mWorld->createScene( "scn0");
NxOgre::Actor* act =mScene->createActor( "cube; cube.mesh", new Cube( 1));
...

this code --bad
...
NxOgre::World* mWorld =new NxOgre::World( "time-controller: ogre");
NxOgre::Scene* mScene =mWorld->createScene( "scn0");

NxOgre::Terrain* terr =new NxOgre::Terrain( FileName, NxOgre::float3( 2, 1, 2));

NxOgre::Actor* mTerrainCollision = mScene->createActor( TERRAIN_ACTOR_NAME, terr, Vector3::ZERO, "mass: 0.0");
...
-- i get err-mess --
------ Build started: Project: physx, Configuration: Release Win32 ------
Compiling...
main.cpp
Linking...
Creating library D:/DEV/OGRE/OgreSDK//bin/Release\physx.lib and object D:/DEV/OGRE/OgreSDK//bin/Release\physx.exp
main.obj : error LNK2019: unresolved external symbol "public: __thiscall NxOgre::Terrain::Terrain(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class Betajaen::Vector3<float>,class NxOgre::ShapeParams const &,class NxOgre::TerrainParams const &)" (??0Terrain@NxOgre@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$Vector3@M@Betajaen@@ABVShapeParams@1@ABVTerrainParams@1@@Z) referenced in function "protected: virtual void __thiscall MyApplication::createScene(void)" (?createScene@MyApplication@@MAEXXZ)
D:/DEV/OGRE/OgreSDK//bin/Release\physx.exe : fatal error LNK1120: 1 unresolved externals
Build log was saved at "file://d:\DEV\helloogre\physx\Release\BuildLog.htm"
physx - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

about my system --
vs2005(vc8)
nxogre version --svn 1.0'21
i using share-lib(dll) nxogre