Code::Blocks and Hydrax

DarkHorizon

13-01-2009 17:57:04

Hello,

I'm trying to build Hydrax (v0.4) in Code::Blocks (v8.02), with Ogre (v1.6 SDK). I've had great success in the past with these libs compiled under Microsoft Visual Studio 2005, however I need to move my code base over to be gcc-compatible, hence my current endeavor.

I've set up my IDE as per the wiki, and have been able to compile Caelum as such.

Everything compiles fine for Hydrax, however I am getting the following linker errors:
||warning: auto-importing has been activated without --enable-auto-import specified on the command line.|
This should work unless it involves constant data structures referencing symbols from auto-imported DLLs.
obj\Release\Water.o:Water.cpp:(.text+0xbd)||undefined reference to `__imp___ZN6Hydrax6Hydrax14setSunPositionERKN4Ogre7Vector3E'|
obj\Release\Water.o:Water.cpp:(.text+0xdf)||undefined reference to `__imp___ZN6Hydrax6Hydrax11setSunColorERKN4Ogre7Vector3E'|
obj\Release\Water.o:Water.cpp:(.text+0x11d)||undefined reference to `__imp___ZN6Hydrax6Hydrax13setWaterColorERKN4Ogre7Vector3E'|
obj\Release\Water.o:Water.cpp:(.text+0x20f)||undefined reference to `__imp___ZN6Hydrax6HydraxC1EPN4Ogre12SceneManagerEPNS1_6CameraEPNS1_8ViewportE'|
obj\Release\Water.o:Water.cpp:(.text+0x250)||undefined reference to `__imp___ZN6Hydrax5Noise6PerlinC1Ev'|
obj\Release\Water.o:Water.cpp:(.text+0x322)||undefined reference to `__imp___ZN6Hydrax6Module13ProjectedGridC1EPNS_6HydraxEPNS_5Noise5NoiseERKN4Ogre5PlaneERKNS_15MaterialManager10NormalModeERKNS1_7OptionsE'|
obj\Release\Water.o:Water.cpp:(.text+0x371)||undefined reference to `__imp___ZN6Hydrax6Hydrax9setModuleEPNS_6Module6ModuleERKb'|
obj\Release\Water.o:Water.cpp:(.text+0x3c7)||undefined reference to `__imp___ZNK6Hydrax14CfgFileManager4loadERKSs'|
obj\Release\Water.o:Water.cpp:(.text+0x3fd)||undefined reference to `__imp___ZN6Hydrax6Hydrax6createEv'|
||=== Build finished: 9 errors, 1 warnings ===|


I've set the project up as a static lib. Originally I was simply importing the MSVC project into Code::Blocks, however more recently I have tried adding all the source code below the /path/to/Hydrax/src folder as well.

Best regards,

Quorthon3D

26-02-2009 17:23:07

I have same problem.
I guess the people here compile it just on visual studio.

Did you try create the dll on gcc, or was your dl compiled on visual studio?
I think that my problem can be this question, but when I try generate dll on gcc, others erros of multiple definition occurs.

Hard problem.

Sorry my english ;]

taxhax

16-04-2009 20:23:44

hi people,
i am from germany and my english is not very well but i hope you will understand my concern. i try to compile the demo.cbp and also set hydrax up as a static library because otherwise it does not work.
now i have the problem that structs.h and structs.cpp are missing so i get the following linker error



-------------- Build: Release in Hydrax ---------------

WARNING: Can't read file's timestamp: D:\Projects\toolz\OgreSDK\src\Hydrax\Structs.cpp
Linking dynamic library: bin\Release\Hydrax.dll
mingw32-g++.exe: obj\Release\src\Hydrax\Structs.o: No such file or directory
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings



any idea ?