[Solved] Error while compiling Detritus.

ArcanumGame

12-09-2010 17:04:20

Okay, I've installed Detritus now, but once i've
implemented #include"NxOgre.h" there occur
several errors. (again :? )

1>------ Erstellen gestartet: Projekt: TestAppBase, Konfiguration: Debug Win32 ------
1>Kompilieren...
1>TestApp.cpp
1>Verknüpfen...
1>TestApp.obj : error LNK2001: Nicht aufgelöstes externes Symbol ""__declspec(dllimport) public: __thiscall NxOgre::Path::Path(char const *)" (__imp_??0Path@NxOgre@@QAE@PBD@Z)".
1>TestApp.obj : error LNK2001: Nicht aufgelöstes externes Symbol ""__declspec(dllimport) public: __thiscall NxOgre::Vec3::Vec3(float const &,float const &,float const &)" (__imp_??0Vec3@NxOgre@@QAE@ABM00@Z)".
1>TestApp.obj : error LNK2001: Nicht aufgelöstes externes Symbol ""__declspec(dllimport) public: __thiscall NxOgre::Path::~Path(void)" (__imp_??1Path@NxOgre@@QAE@XZ)".
1>bin\Debug\TestAppBase.exe : fatal error LNK1120: 3 nicht aufgelöste externe Verweise.
1>Das Buildprotokoll wurde unter "file://d:\Users\Meatbug\Documents\Visual Studio 2008\Projects\TestAppBase\TestAppBase\obj\Debug\BuildLog.htm" gespeichert.
1>TestAppBase - 4 Fehler, 0 Warnung(en)
========== Erstellen: 0 erfolgreich, Fehler bei 1, 0 aktuell, 0 übersprungen ==========


I've added the path to additional libraries and tell VC++ that the library, it should use "NxOgre.lib" is. :?

betajaen

12-09-2010 18:42:07

Something isn't included or linked to.


Also; http://github.com/betajaen/nxogretutorials The tutorials are pretty good start to working with NxOgre and Critter, assuming you have the NXOGRE_DIR and PHYSX_DIR all set up, those tutorials should compile and ready to go.

ArcanumGame

12-09-2010 19:00:16

Something isn't included or linked to.


Also; http://github.com/betajaen/nxogretutorials The tutorials are pretty good start to working with NxOgre and Critter, assuming you have the NXOGRE_DIR and PHYSX_DIR all set up, those tutorials should compile and ready to go.


Is it important to use this Critter with NxOgre?
For the examples it is, but what is it for?

Plus: The error still there, which my application crash down,
when I use the TimeController in the FrameRenderingQueued.

In the TestApp.h:

protected:
virtual bool frameRenderingQueued(const Ogre::FrameEvent& evt);


and in the TestApp.cpp:

bool TestApp::frameRenderingQueued(const Ogre::FrameEvent& evt)
{
if(mWindow->isClosed())
return false;

if(mShutDown)
return false;

mKeyboard->capture();
mMouse->capture();

mTrayMgr->frameRenderingQueued(evt);

CharacterNode->translate(0, 0, RUNNING_FOREWARD*evt.timeSinceLastFrame, Ogre::Node::TS_LOCAL);
CharacterNode->translate(RUNNING_LEFT*evt.timeSinceLastFrame, 0, 0, Ogre::Node::TS_LOCAL);
CharacterNode->translate(0, 0, RUNNING_BACKWARD*evt.timeSinceLastFrame, Ogre::Node::TS_LOCAL);
CharacterNode->translate(RUNNING_RIGHT*evt.timeSinceLastFrame, 0, 0, Ogre::Node::TS_LOCAL);

mTimeController->advance(evt.timeSinceLastFrame);
return TestApp::frameRenderingQueued(evt);
}


And when I want to compile Critter, this happens:

...
...
...
1>CritterBodyDescription.cpp
1>d:\critter\build\source\critterenums.h(60) : error C2039: 'RigidBodyType_USER_BEGIN': Ist kein Element von 'NxOgre::Enums'
1>d:\critter\build\source\critterenums.h(60) : error C2065: 'RigidBodyType_USER_BEGIN': nichtdeklarierter Bezeichner
1>d:\critter\build\source\critterenums.h(60) : error C2056: Ungültiger Ausdruck
...
...
...

betajaen

12-09-2010 19:46:27

If you want to use Ogre with NxOgre then you need Critter.

Are you sure you have the environmental variables/directories pointing the right places?

ArcanumGame

12-09-2010 19:57:33

If you want to use Ogre with NxOgre then you need Critter.

Are you sure you have the environmental variables/directories pointing the right places?


But doesn't ('RigidBodyType_USER_BEGIN' : is not a member of 'NxOgre::Enums') means,
that the compiler knows about NxOgre, but don't find the "RigidBodyType_USER_BEGIN" in it?

Or is it maybe, because I use Critter from the "Master Branch" while NxOgre is Detritus?
But I can't find any Critter in Detritus?

Okay the version of Critter should run with Detritus.
But why is there missing code?

class CritterPublicClass Body : public NxOgre::Actor, public NxOgre::TimeListener
{

public:


friend class RenderSystem;

NXOGRE_GC_FRIEND_NEW4
NXOGRE_GC_FRIEND_DELETE

...
...
...


what is "NXOGRE_GC_FRIEND_NEW4" for example?
it seems, that vc++ doesn't know it, too.

betajaen

12-09-2010 20:25:50

RigidBodyType_USERBEGIN is most definitely there. You must be using the wrong versions.

As for a Detritus branch of Critter, there isn't one. Critter was written with Detritus in mind. Just think of "Critter" as the "Detritus" branch of "OGRE3DRenderSystem."


Best thing to do, is delete all of your downloaded NxOgre files, and directories. Undo all the environmental variables, and re-download everything again:

http://github.com/betajaen/nxogre/zipball/detritus
http://github.com/betajaen/critter/zipball/master

Then follow these instructions to the letter; http://nxogre.org/compiling_nxogre_from_git

ArcanumGame

13-09-2010 18:09:47

RigidBodyType_USERBEGIN is most definitely there. You must be using the wrong versions.

As for a Detritus branch of Critter, there isn't one. Critter was written with Detritus in mind. Just think of "Critter" as the "Detritus" branch of "OGRE3DRenderSystem."


Best thing to do, is delete all of your downloaded NxOgre files, and directories. Undo all the environmental variables, and re-download everything again:

http://github.com/betajaen/nxogre/zipball/detritus
http://github.com/betajaen/critter/zipball/master

Then follow these instructions to the letter; http://nxogre.org/compiling_nxogre_from_git


Okay it's working now. :)
But when I compile my project with NxOgre and Critter in RELEASE mode,
than it bothering me down with some errors, which are telling me, that there
is a Linkerproblem in a external member. This member is the RELEASE library
of critter and while compiling it again, there are also some errors like:

1>NxOgre.lib(NxOgre.dll) : warning LNK4221: Es wurden keine öffentlichen Symbole gefunden. Zugriff auf archivierten Member wird nicht möglich sein.
1>CritterStable.obj : warning LNK4221: Es wurden keine öffentlichen Symbole gefunden. Zugriff auf archivierten Member wird nicht möglich sein.


What I think is, that this is the source of my problem. Some public symbols seems to be missing in "CritterStable.obj".
How can I fix that error, because compiling is working.

betajaen

13-09-2010 18:13:13

Ignore it, everyone has them. It's good to go now.

ArcanumGame

13-09-2010 20:37:17

Ignore it, everyone has them. It's good to go now.

But lastly I just have to fix a Linkererror in my Application.
I've tried to link the same lib's like your testapp's but mine
just build in debugmode. in releasemode it's telling me:

1>MyTestApp.obj : error LNK2001: unresolved external symbol ""__declspec(dllimport) public: void __thiscall NxOgre::ResourceSystem::openProtocol(class NxOgre::ResourceProtocol *)" (__imp_?openProtocol@ResourceSystem@NxOgre@@QAEXPAVResourceProtocol@2@@Z)".

... Some More ...


The strange thing is, that this only happens in my Application.
But the Linker looks the same like in your app's, I can't understand this.
:?

Edit: is working now (I've just copied all Linker-links from the examples to my project, and compiling worked,
i've no idea what i've forgot. xD)