[SOLVED]cannot find -lOgreMain when compiling OgreNewt in CB

danyalejandro

31-01-2009 21:22:45

Hello!

I'm trying to compile OgreNewt (downloaded the version avaliable in their website) in C::B with MinGW. I'm in Windows XP. I'm using OGRE 1.6.1 SDK for Code::Blocks and the standard installation of MinGW, as the Modified MinGW toolbox is no longer required (it says so in the downloads section of ogre.org).

After doing the following:

* Importing the visual studio proyect into code:blocks
* Adding "#include <stddef.h>" to Newton.h
* Erasing "_OgreNewtExport" in Ogrenewt_collisionprimitives.h line 27

And trying to compile, I get this error:

Compiling: src\OgreNewt_World.cpp
Linking dynamic library: OgreNewt_Main_vc71.dll
C:\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ld.exe: cannot find -lOgreMain
collect2: ld returned 1 exit status
Process terminated with status 1 (1 minutes, 8 seconds)
1 errors, 1 warnings


I'm a bit of a noob, but it seems like the problem's with the MinGW toolbox... Am I wrong? what should I do? Should I try the CVS version?

danyalejandro

01-02-2009 20:38:42

YAY! I was able to do it. I just needed to include $(OGRE_HOME)\bin\release in the linker directories (OgreMain.dll).

I'll post my complete setup soon! ^_^