Compiling last Hydrax with OGRE 1.6

PJani

06-01-2009 23:11:46

Im using CodeBlocks + GCC Win32
Im having problems compiling Hydrax i get these errors and couple of warrnings

C:\Documents and Settings\PJani\Desktop\project57_prj\Hydrax\src\Hydrax\Noise\Perlin\Perlin.cpp|143|error: invalid initialization of non-const reference of type 'Ogre::TexturePtr&' from a temporary of type 'Ogre::TexturePtr'|
C:\Documents and Settings\PJani\Desktop\project57_prj\Hydrax\src\Hydrax\Noise\Perlin\Perlin.cpp|152|error: invalid initialization of non-const reference of type 'Ogre::TexturePtr&' from a temporary of type 'Ogre::TexturePtr'|

Part of the code with errors meybe there is more


// Create our perlin textures

Ogre::TexturePtr& mPerlinTexture0
= Ogre::TextureManager::getSingleton().
createManual("_Hydrax_Perlin_Noise0",
HYDRAX_RESOURCE_GROUP,
Ogre::TEX_TYPE_2D,
np_size, np_size, 0,
Ogre::PF_L16,
Ogre::TU_DYNAMIC_WRITE_ONLY);

Ogre::TexturePtr& mPerlinTexture1
= Ogre::TextureManager::getSingleton().
createManual("_Hydrax_Perlin_Noise1",
HYDRAX_RESOURCE_GROUP,
Ogre::TEX_TYPE_2D,
np_size, np_size, 0,
Ogre::PF_L16,
Ogre::TU_DYNAMIC_WRITE_ONLY);

mGPUNormalMapManager->addTexture(mPerlinTexture0);
mGPUNormalMapManager->addTexture(mPerlinTexture1);


Xavyiy

07-01-2009 09:44:28

Just delete the textureptr reference:

Ogre::TexturePtr& mPerlinTexture0
by
Ogre::TexturePtr mPerlinTexture0

And the same with Ogre::TexturePtr& mPerlinTexture1.

;)

NintenDave

07-01-2009 14:31:39

I'm having trouble compiling Demo1 with MinGW. I can't find Module.h, and neither can my compiler.

[edit]
OK, screw that, I found it, but it turned out I'd also forgotten to compile Hydrax :)
When I got around to that though, I found PerlinPG.cpp and PerlinPG.h didn't exist anywhere. Also, I had to change a few file paths to get this to compile. I don't think relying on files to be at locations relative to one-another (#include "../../Prerequisites.h") is guaranteed to be cross-compiler. Also, Module.h wasn't where the code expected it to be. Can Hydrax please be updated to amend these things, and can someone please provide me with PerlinPG.cpp and PerlinPG.h.

Thanks.

[edit]
Okily dokily, removed PerlinPG.cpp and it compiled, but it won't link because it has multiple definitions in the Hydrax class:
C:\Documents and Settings\Dave\Desktop\hydrax\Hydrax\src\Hydrax\hydrax.cpp|33|multiple definition of `Hydrax::Hydrax::Hydrax(Ogre::SceneManager*, Ogre::Camera*, Ogre::Viewport*)'|
obj\Debug\src\Hydrax\Hydrax.o:C:\Documents and Settings\Dave\Desktop\hydrax\Hydrax\src\Hydrax\hydrax.cpp|33|first defined here|


[edit]
Okay, I didn't notice it first time I looked, but I removed the second Hydrax.cpp :D

These are some pretty annoying issues, I hope they get resolved soon.