Newbie with Hydrax : need help for compiling dll and demo

Froyok

31-10-2009 13:58:01

Hello !
First : sorry for this topic, but google and the ogre forum (or addons) are very silent in front of my problem.
All those who have already compiled Hydrax are going to laugh I suppose, but I have to say that I am in front of errors which remain incomprehensible for me.

Second : I use Code::blocks 8.02 and Ogre v1.6.1 [Shoggoth] (22 January 2009) with hydrax 0.5.1
[EDIT] I must use the source code (from svn) version ?

1]
For start, I try to compil the Hydrax static library (.a), that's work (but with 300 warnings ! :lol: ). But when I want to create the Hydrax dll, I get this error :
||=== Hydrax, Release ===|
first defineCreating library file||bin\Release\libHydrax.a|
||=== Build finished: 1 errors, 0 warnings ===|


I don't understand at all this error.

2]
And when I try to compil the demo with my static library, I get :
||=== Demo1, Release ===|
I:\Jeux\D\DOOCE\Hydrax-v0.5.1\Demo1\Hydrax\Hydrax\Image.h|268|warning: no newline at end of file|
I:\Jeux\D\DOOCE\Hydrax-v0.5.1\Demo1\Hydrax\Hydrax\MaterialManager.h|380|warning: no newline at end of file|
I:\Jeux\D\DOOCE\Hydrax-v0.5.1\Demo1\Hydrax\Hydrax\RttManager.h|516|warning: no newline at end of file|
I:\Jeux\D\DOOCE\Hydrax-v0.5.1\Demo1\Hydrax\Hydrax\TextureManager.h|139|warning: no newline at end of file|
I:\Jeux\D\DOOCE\Hydrax-v0.5.1\Demo1\Hydrax\Hydrax\Noise\Perlin\..\..\RttManager.h|516|warning: no newline at end of file|
I:\Jeux\D\DOOCE\Hydrax-v0.5.1\Demo1\Hydrax\Hydrax\Noise\Perlin\..\..\GPUNormalMapManager.h|155|warning: no newline at end of file|
I:\Jeux\D\DOOCE\Hydrax-v0.5.1\Demo1\Hydrax\Hydrax\Noise\Perlin\..\Noise.h|136|warning: no newline at end of file|
I:\Jeux\D\DOOCE\Hydrax-v0.5.1\Demo1\Hydrax\Hydrax\Noise\Perlin\Perlin.h|283|warning: no newline at end of file|
I:\Jeux\D\DOOCE\Hydrax-v0.5.1\Demo1\Hydrax\Hydrax\DecalsManager.h|292|warning: no newline at end of file|
I:\Jeux\D\DOOCE\Hydrax-v0.5.1\Demo1\Hydrax\Hydrax\GPUNormalMapManager.h|155|warning: no newline at end of file|
I:\Jeux\D\DOOCE\Hydrax-v0.5.1\Demo1\Hydrax\Hydrax\CfgFileManager.h|212|warning: no newline at end of file|
I:\Jeux\D\DOOCE\Hydrax-v0.5.1\Demo1\Hydrax\Hydrax\Modules\..\Noise\Noise.h|136|warning: no newline at end of file|
I:\Jeux\D\DOOCE\Hydrax-v0.5.1\Demo1\Hydrax\Hydrax\Modules\..\MaterialManager.h|380|warning: no newline at end of file|
I:\Jeux\D\DOOCE\Hydrax-v0.5.1\Demo1\Hydrax\Hydrax\Modules\..\GPUNormalMapManager.h|155|warning: no newline at end of file|
I:\Jeux\D\DOOCE\Hydrax-v0.5.1\Demo1\Hydrax\Hydrax\Modules\Module.h|160|warning: no newline at end of file|
I:\Jeux\D\DOOCE\Hydrax-v0.5.1\Demo1\Hydrax\Hydrax\Noise\Perlin\Perlin.h|283|warning: no newline at end of file|
I:\Jeux\D\DOOCE\Hydrax-v0.5.1\Demo1\Hydrax\Hydrax\Modules\ProjectedGrid\..\Module.h|160|warning: no newline at end of file|
I:\Jeux\D\DOOCE\Hydrax-v0.5.1\Demo1\Hydrax\Hydrax\Modules\ProjectedGrid\ProjectedGrid.h|278|warning: no newline at end of file|
I:\Jeux\D\DOOCE\Hydrax-v0.5.1\Demo1\src\main.cpp|273|warning: "/*" within comment|
||Info: resolving Ogre::Math::fDeg2Rad by linking to __imp___ZN4Ogre4Math8fDeg2RadE |
||Info: resolving Ogre::Vector3::ZERO by linking to __imp___ZN4Ogre7Vector34ZEROE |
||Info: resolving Ogre::Math::PI by linking to __imp___ZN4Ogre4Math2PIE |
||Info: resolving Ogre::StringUtil::BLANK by linking to __imp___ZN4Ogre10StringUtil5BLANKE |
||Info: resolving Ogre::Quaternion::IDENTITY by linking to __imp___ZN4Ogre10Quaternion8IDENTITYE |
||Info: resolving Ogre::Vector3::NEGATIVE_UNIT_Y by linking to __imp___ZN4Ogre7Vector315NEGATIVE_UNIT_YE |
||Info: resolving Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME by linking to __imp___ZN4Ogre20ResourceGroupManager27DEFAULT_RESOURCE_GROUP_NAMEE |
||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\src\main.o:main.cpp:(.text$_ZN25ExampleHydraxDemoListener12changeSkyBoxEv[ExampleHydraxDemoListener::changeSkyBox()]+0xd6)||undefined reference to `__imp___ZN6Hydrax6Hydrax14setSunPositionERKN4Ogre7Vector3E'|
obj\Release\src\main.o:main.cpp:(.text$_ZN25ExampleHydraxDemoListener12changeSkyBoxEv[ExampleHydraxDemoListener::changeSkyBox()]+0xf7)||undefined reference to `__imp___ZN6Hydrax6Hydrax11setSunColorERKN4Ogre7Vector3E'|
)]+0xd7)||undefined reference to `__imp___ZN6Hydrax6Hydrax6updateERKf'|
obj\Release\src\main.o:main.cpp:(.text$_ZN9SampleApp11createSceneEv[SampleApp::createScene()]+0x2cd)||undefined reference to `__imp___ZN6Hydrax6HydraxC1EPN4Ogre12SceneManagerEPNS1_6CameraEPNS1_8ViewportE'|
obj\Release\src\main.o:main.cpp:(.text$_ZN9SampleApp11createSceneEv[SampleApp::createScene()]+0x305)||undefined reference to `__imp___ZN6Hydrax5Noise6PerlinC1Ev'|
obj\Release\src\main.o:main.cpp:(.text$_ZN9SampleApp11createSceneEv[SampleApp::createScene()]+0x407)||undefined reference to `__imp___ZN6Hydrax6Module13ProjectedGridC1EPNS_6HydraxEPNS_5Noise5NoiseERKN4Ogre5PlaneERKNS_15MaterialManager10NormalModeERKNS1_7OptionsE'|
obj\Release\src\main.o:main.cpp:(.text$_ZN9SampleApp11createSceneEv[SampleApp::createScene()]+0x441)||undefined reference to `__imp___ZN6Hydrax6Hydrax9setModuleEPNS_6Module6ModuleERKb'|
obj\Release\src\main.o:main.cpp:(.text$_ZN9SampleApp11createSceneEv[SampleApp::createScene()]+0x496)||undefined reference to `__imp___ZNK6Hydrax14CfgFileManager4loadERKSs'|
obj\Release\src\main.o:main.cpp:(.text$_ZN9SampleApp11createSceneEv[SampleApp::createScene()]+0x4cd)||undefined reference to `__imp___ZN6Hydrax6Hydrax6createEv'|
obj\Release\src\main.o:main.cpp:(.text$_ZN9SampleApp11createSceneEv[SampleApp::createScene()]+0x5ff)||undefined reference to `__imp___ZN6Hydrax15MaterialManager17addDepthTechniqueEPN4Ogre9TechniqueERKb'|
||=== Build finished: 10 errors, 20 warnings ===|


Hmmm, for this linking error, It's my libHydrax.a the problem ?

Froyok

05-11-2009 05:20:41

Nobody can help me ?
Now, when I try to compile the dll od Hydrax, I get this :

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

Linking dynamic library: bin\Release\Hydrax.dll
obj\Release\src\Hydrax\hydrax.o:hydrax.cpp:(.text+0x0): définitions multiples de « Hydrax::Hydrax::isComponent(Hydrax::HydraxComponent const&) »
obj\Release\src\Hydrax\Hydrax.o:hydrax.cpp:(.text+0x0): défini pour la première fois ici
obj\Release\src\Hydrax\hydrax.o:hydrax.cpp:(.text+0x40): définitions multiples de « Hydrax::Hydrax::remove() »
obj\Release\src\Hydrax\Hydrax.o:hydrax.cpp:(.text+0x40): défini pour la première fois ici
obj\Release\src\Hydrax\hydrax.o:hydrax.cpp:(.text+0xe0): définitions multiples de « Hydrax::Hydrax::setPolygonMode(Ogre::PolygonMode const&) »
obj\Release\src\Hydrax\Hydrax.o:hydrax.cpp:(.text+0xe0): défini pour la première fois ici
obj\Release\src\Hydrax\hydrax.o:hydrax.cpp:(.text+0x1a0): définitions multiples de « Hydrax::Hydrax::setShaderMode(Hydrax::MaterialManager::ShaderMode const&) »
obj\Release\src\Hydrax\Hydrax.o:hydrax.cpp:(.text+0x1a0): défini pour la première fois ici
obj\Release\src\Hydrax\hydrax.o:hydrax.cpp:(.text+0x220): définitions multiples de « Hydrax::Hydrax::setPlanesError(float const&) »
obj\Release\src\Hydrax\Hydrax.o:hydrax.cpp:(.text+0x220): défini pour la première fois ici
obj\Release\src\Hydrax\hydrax.o:hydrax.cpp:(.text+0x230): définitions multiples de « Hydrax::Hydrax::DeviceListener::eventOccurred(std::string const&, std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > > const*) »
obj\Release\src\Hydrax\Hydrax.o:hydrax.cpp:(.text+0x230): défini pour la première fois ici
obj\Release\src\Hydrax\hydrax.o:hydrax.cpp:(.text+0x270): définitions multiples de « Hydrax::Hydrax::setCausticsEnd(float const&) »
obj\Release\src\Hydrax\Hydrax.o:hydrax.cpp:(.text+0x270): défini pour la première fois ici
obj\Release\src\Hydrax\hydrax.o:hydrax.cpp:(.text+0x460): définitions multiples de « Hydrax::Hydrax::setCausticsPower(float const&) »
obj\Release\src\Hydrax\Hydrax.o:hydrax.cpp:(.text+0x460): défini pour la première fois ici
obj\Release\src\Hydrax\hydrax.o:hydrax.cpp:(.text+0x920): définitions multiples de « Hydrax::Hydrax::setCausticsScale(float const&) »
obj\Release\src\Hydrax\Hydrax.o:hydrax.cpp:(.text+0x920): défini pour la première fois ici
obj\Release\src\Hydrax\hydrax.o:hydrax.cpp:(.text+0xb00): définitions multiples de « Hydrax::Hydrax::setSmoothPower(float const&) »
obj\Release\src\Hydrax\Hydrax.o:hydrax.cpp:(.text+0xb00): défini pour la première fois ici
obj\Release\src\Hydrax\hydrax.o:hydrax.cpp:(.text+0xce0): définitions multiples de « Hydrax::Hydrax::setDepthLimit(float const&) »
obj\Release\src\Hydrax\Hydrax.o:hydrax.cpp:(.text+0xce0): défini pour la première fois ici
obj\Release\src\Hydrax\hydrax.o:hydrax.cpp:(.text+0xee0): définitions multiples de « Hydrax::Hydrax::setFoamTransparency(float const&) »
obj\Release\src\Hydrax\Hydrax.o:hydrax.cpp:(.text+0xee0): défini pour la première fois ici
obj\Release\src\Hydrax\hydrax.o:hydrax.cpp:(.text+0x1250): définitions multiples de « Hydrax::Hydrax::setFoamStart(float const&) »
obj\Release\src\Hydrax\Hydrax.o:hydrax.cpp:(.text+0x1250): défini pour la première fois ici
obj\Release\src\Hydrax\hydrax.o:hydrax.cpp:(.text+0x15c0): définitions multiples de « Hydrax::Hydrax::setFoamScale(float const&) »
obj\Release\src\Hydrax\Hydrax.o:hydrax.cpp:(.text+0x15c0): défini pour la première fois ici
obj\Release\src\Hydrax\hydrax.o:hydrax.cpp:(.text+0x1930): définitions multiples de « Hydrax::Hydrax::setFoamMaxDistance(float const&) »
obj\Release\src\Hydrax\Hydrax.o:hydrax.cpp:(.text+0x1930): défini pour la première fois ici
obj\Release\src\Hydrax\hydrax.o:hydrax.cpp:(.text+0x1ca0): définitions multiples de « Hydrax::Hydrax::setSunColor(Ogre::Vector3 const&) »
obj\Release\src\Hydrax\Hydrax.o:hydrax.cpp:(.text+0x1ca0): défini pour la première fois ici
obj\Release\src\Hydrax\hydrax.o:hydrax.cpp:(.text+0x2030): définitions multiples de « Hydrax::Hydrax::setSunArea(float const&) »
obj\Release\src\Hydrax\Hydrax.o:hydrax.cpp:(.text+0x2030): défini pour la première fois ici
obj\Release\src\Hydrax\hydrax.o:hydrax.cpp:(.text+0x23a0): définitions multiples de « Hydrax::Hydrax::setSunStrength(float const&) »
obj\Release\src\Hydrax\Hydrax.o:hydrax.cpp:(.text+0x23a0): défini pour la première fois ici
obj\Release\src\Hydrax\hydrax.o:hydrax.cpp:(.text+0x2710): définitions multiples de « Hydrax::Hydrax::setSunPosition(Ogre::Vector3 const&) »
obj\Release\src\Hydrax\Hydrax.o:hydrax.cpp:(.text+0x2710): défini pour la première fois ici
obj\Release\src\Hydrax\hydrax.o:hydrax.cpp:(.text+0x2b20): définitions multiples de « Hydrax::Hydrax::setNormalDistortion(float const&) »
obj\Release\src\Hydrax\Hydrax.o:hydrax.cpp:(.text+0x2b20): défini pour la première fois ici
obj\Release\src\Hydrax\hydrax.o:hydrax.cpp:(.text+0x2e50): définitions multiples de « Hydrax::Hydrax::setWaterColor(Ogre::Vector3 const&) »
obj\Release\src\Hydrax\Hydrax.o:hydrax.cpp:(.text+0x2e50): défini pour la première fois ici
obj\Release\src\Hydrax\hydrax.o:hydrax.cpp:(.text+0x3790): définitions multiples de « Hydrax::Hydrax::setGlobalTransparency(float const&) »
obj\Release\src\Hydrax\Hydrax.o:hydrax.cpp:(.text+0x3790): défini pour la première fois ici
obj\Release\src\Hydrax\hydrax.o:hydrax.cpp:(.text+0x3ac0): définitions multiples de « Hydrax::Hydrax::setFullReflectionDistance(float const&) »
obj\Release\src\Hydrax\Hydrax.o:hydrax.cpp:(.text+0x3ac0): défini pour la première fois ici
obj\Release\src\Hydrax\hydrax.o:hydrax.cpp:(.text+0x3df0): définitions multiples de « Hydrax::Hydrax::_setStrength(float const&) »
obj\Release\src\Hydrax\Hydrax.o:hydrax.cpp:(.text+0x3df0): défini pour la première fois ici
obj\Release\src\Hydrax\hydrax.o:hydrax.cpp:(.text+0x4160): définitions multiples de « Hydrax::Hydrax::rotate(Ogre::Quaternion const&) »
obj\Release\src\Hydrax\Hydrax.o:hydrax.cpp:(.text+0x4160): défini pour la première fois ici
obj\Release\src\Hydrax\hydrax.o:hydrax.cpp:(.text+0x44b0): définitions multiples de « Hydrax::Hydrax::setPosition(Ogre::Vector3 const&) »
obj\Release\src\Hydrax\Hydrax.o:hydrax.cpp:(.text+0x44b0): défini pour la première fois ici
obj\Release\src\Hydrax\hydrax.o:hydrax.cpp:(.text+0x4740): définitions multiples de « Hydrax::Hydrax::setModule(Hydrax::Module::Module*, bool const&) »
obj\Release\src\Hydrax\Hydrax.o:hydrax.cpp:(.text+0x4740): défini pour la première fois ici
obj\Release\src\Hydrax\hydrax.o:hydrax.cpp:(.text+0x5e90): définitions multiples de « Hydrax::Hydrax::setComponents(Hydrax::HydraxComponent const&) »
obj\Release\src\Hydrax\Hydrax.o:hydrax.cpp:(.text+0x5e90): défini pour la première fois ici
obj\Release\src\Hydrax\hydrax.o:hydrax.cpp:(.text+0x7e80): définitions multiples de « Hydrax::Hydrax::~Hydrax() »
obj\Release\src\Hydrax\Hydrax.o:hydrax.cpp:(.text+0x7e80): défini pour la première fois ici
obj\Release\src\Hydrax\hydrax.o:hydrax.cpp:(.text+0x8370): définitions multiples de « Hydrax::Hydrax::~Hydrax() »
obj\Release\src\Hydrax\Hydrax.o:hydrax.cpp:(.text+0x8370): défini pour la première fois ici
obj\Release\src\Hydrax\hydrax.o:hydrax.cpp:(.text+0x8860): définitions multiples de « Hydrax::Hydrax::Hydrax(Ogre::SceneManager*, Ogre::Camera*, Ogre::Viewport*) »
obj\Release\src\Hydrax\Hydrax.o:hydrax.cpp:(.text+0x8860): défini pour la première fois ici
obj\Release\src\Hydrax\hydrax.o:hydrax.cpp:(.text+0x8fd0): définitions multiples de « Hydrax::Hydrax::Hydrax(Ogre::SceneManager*, Ogre::Camera*, Ogre::Viewport*) »
obj\Release\src\Hydrax\Hydrax.o:hydrax.cpp:(.text+0x8fd0): défini pour la première fois ici
obj\Release\src\Hydrax\hydrax.o:hydrax.cpp:(.text+0x9740): définitions multiples de « Hydrax::Hydrax::_checkUnderwater(float const&) »
obj\Release\src\Hydrax\Hydrax.o:hydrax.cpp:(.text+0x9740): défini pour la première fois ici
obj\Release\src\Hydrax\hydrax.o:hydrax.cpp:(.text+0xa4b0): définitions multiples de « Hydrax::Hydrax::update(float const&) »
obj\Release\src\Hydrax\Hydrax.o:hydrax.cpp:(.text+0xa4b0): défini pour la première fois ici
obj\Release\src\Hydrax\hydrax.o:hydrax.cpp:(.text+0xa520): définitions multiples de « Hydrax::Hydrax::_checkViCréation du fichier de bibliothèque: bin\Release\libHydrax.a
sible() »
obj\Release\src\Hydrax\Hydrax.o:hydrax.cpp:(.text+0xa520): défini pour la première fois ici
obj\Release\src\Hydrax\hydrax.o:hydrax.cpp:(.text+0xa6c0): définitions multiples de « Hydrax::Hydrax::setVisible(bool const&) »
obj\Release\src\Hydrax\Hydrax.o:hydrax.cpp:(.text+0xa6c0): défini pour la première fois ici
obj\Release\src\Hydrax\hydrax.o:hydrax.cpp:(.text+0xa6e0): définitions multiples de « Hydrax::Hydrax::create() »
obj\Release\src\Hydrax\Hydrax.o:hydrax.cpp:(.text+0xa6e0): défini pour la première fois ici
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 1 seconds)
0 errors, 0 warnings


"défini pour la première fois ici" is "Defines for the first time here" (but in french ;) ).
I don"t know what can I do...

johnohollaren

21-12-2009 06:47:35

hey i ran into the exact same problem compiling with the same setup you have, and we managed to figure it out. can you list what your adding to the code blocks project / project build settings, etc? hopefully i can be of some assistance if you have not figured this out already!