Almost there!

Problems building or running the engine, queries about how to use features etc.
User avatar
crazyman5000
Gnoblar
Posts: 9
Joined: Tue Jan 11, 2005 4:30 am
Location: parent's basement

Almost there!

Post by crazyman5000 »

everythings built, and im trying to build my first Ogre app using the tutorial "Humble Beginnings: Your First OGRE Application".

i followed the project settings intructs. and got the error 'LINK : fatal error LNK1104: cannot open file "OGREMain.LIB" '.

OgreMain.lib is in the Release folder of OgreMain\lib, but not in the Debug folder, thats OgreMain_d.lib. i tried to include 'OgreMain_d.lib' but a STLport_vc6_stldebug45.dll was not found at runtime. :?

changing the lib path to the Release folder compiles this:
--------------------Configuration: Space - Win32 Debug--------------------
Linking...
SkyBox.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) private: void * __thiscall Ogre::MemoryManager::op_new_sc(unsigned int,unsigned int)" (__imp_?op_new_sc@MemoryManager@Ogre@@AAEPAXII@Z)
SkyBox.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) private: unsigned int __thiscall Ogre::MemoryManager::_getProcessID(void)" (__imp_?_getProcessID@MemoryManager@Ogre@@AAEIXZ)
SkyBox.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) private: void __thiscall Ogre::MemoryManager::op_del_sc(void *,unsigned int)" (__imp_?op_del_sc@MemoryManager@Ogre@@AAEXPAXI@Z)
SkyBox.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall Ogre::MemoryManager::setOwner(char const *,unsigned int,char const *)" (__imp_?setOwner@MemoryManager@Ogre@@QAEXPBDI0@Z)
..\Common\Bin\Debug\Space.EXE : fatal error LNK1120: 4 unresolved externals
Error executing link.exe.

Space.EXE - 5 error(s), 0 warning(s)


just one step away i hope to trying out the engine!
User avatar
monster
OGRE Community Helper
OGRE Community Helper
Posts: 1098
Joined: Mon Sep 22, 2003 2:40 am
Location: Melbourne, Australia

Post by monster »

If you're building a debug version of your application you'll need to link to OgreMain_d.lib (and the runtime will then need OgreMain_d.dll) if you're building in Release mode then you'll need to link to OgreMain.lib (and hence the OgreMain.dll) runtime library.

You're trying to compile a Debug mode executable against the Release mode Ogre libraries, which is why it doesn't work.

Link your release mode executable to OgreMain_d.lib (which I imagine worked OK, since you got a runtime error) and copy the STLPort DLLs you require into your ogrenew/Samples/Common/bin/Debug directories manually
User avatar
crazyman5000
Gnoblar
Posts: 9
Joined: Tue Jan 11, 2005 4:30 am
Location: parent's basement

Post by crazyman5000 »

thanx monster, just copying that stlport dll did the trick.

OGRE works great!! :D :D :D