Link error using NxGenerateTriangleMeshFromOgreMesh

Backov

30-05-2007 20:22:21

I'm not quite sure why, but I'm getting a link error with just this one function. I'm creating a world and a scene before it and they're linking fine.

Error 3 error LNK2019: unresolved external symbol "class NxTriangleMesh * __cdecl NxOgre::NxGenerateTriangleMeshFromOgreMesh(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class NxScene *)" (?NxGenerateTriangleMeshFromOgreMesh@NxOgre@@YAPAVNxTriangleMesh@@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PAVNxScene@@@Z) referenced in function "public: virtual void __thiscall TestState::BecomeActive(void)" (?BecomeActive@TestState@@UAEXXZ) TestState.obj

betajaen

30-05-2007 20:31:08

It's not being exported in the DLL. Open up NxOgreCooking.h and prefix "NxExport" to the function declarations, like this:

NxExport NxConvexMesh* NxGenerateConvexMeshFromOgreMesh(const NxString& meshname, NxScene *scene, NxVec3 scale = NxVec3(1,1,1));

And recompile.