Compiling HydraX 0.5.1 with Codeblocks

pokix1

20-03-2013 22:45:41

Hello my friends !

I'm trying to compile Hydrax 0.5.1 in DLL by using Codeblocks, but I have a weird issue : an errors appears in "Enums.h", on both enum :

\Hydrax\src\Hydrax\Enums.h|46|compilator internal error : Segmentation fault|

It's very strange, and the only way I have to get through this is to replace in prerequisites.h this :

#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
#ifdef HYDRAX_LIB
#define DllExport __declspec (dllexport)
#else
#define DllExport __declspec (dllimport)
#endif
#else
#define DllExport
#endif


by this :


#define DllExport


It allows me to compile in static version, but I'm not sure then if it's a "broken" version. Anyway, in my project source code, when I try to use the lib (by creating a Hydrax::Hydrax pointer for example), tons of errors appears in hydrax.cpp :

..\dependencies\Hydrax\lib\libHydrax_d.a(Hydrax.o)||In function `_ZN6Hydrax6HydraxC2EPN4Ogre12SceneManagerEPNS1_6CameraEPNS1_8ViewportE':|
D:\2Dran\dependencies\Hydrax\src\Hydrax\hydrax.cpp|74|undefined reference to `Ogre::LogManager::getSingleton()'|
D:\2Dran\dependencies\Hydrax\src\Hydrax\hydrax.cpp|74|undefined reference to `Ogre::LogManager::logMessage(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Ogre::LogMessageLevel, bool)'|
..\dependencies\Hydrax\lib\libHydrax_d.a(Hydrax.o)||In function `_ZN6Hydrax6HydraxD2Ev':|
... etc


i assume that's because the static lib is "wrong", but I really don't know what to do :( . Did someone have the same troubles with Codeblocks ? Does anyone know how to fix it ?
Thanks :D

pokix1

21-03-2013 09:04:32

Hello, I just found how to solve the second problem. It was stupid,

I was linking my libhydrax.a AFTER OgreMain, which is of course wrong. Sorry for the disturbance :)