Compiled OGRE 1.7.0 "Cthugha" & Hydrax 0.5


26-05-2009 06:24:32


I resolved the two compile errors below with CThugha: see the next post

1) Since rev 8459 the SceneNode doesn't inherit anymore from Renderable .

Hence Hydrax doesn't compile because it uses getWorldTransforms

1>.\src\Hydrax\Modules\SimpleGrid\SimpleGrid.cpp(306) : error C2039: 'getWorldTransforms' : is not a member of 'Ogre::SceneNode'

Should we use SceneNode::_getFullTransform() ?

2) The line 306 of CfgFileManager.cpp:

std::vector<Ogre::String> Cmpnts = Ogre::StringUtil::split(CfgFile.getSetting("Components"), "|");
gives this error

1>.\src\Hydrax\CfgFileManager.cpp(305) : error C2440: 'initializing' : cannot convert from 'std::vector<_Ty,_Ax>' to 'std::vector<_Ty>'
1> with
1> [
1> _Ty=Ogre::String,
1> _Ax=Ogre::STLAllocator<Ogre::String,Ogre::GeneralAllocPolicy>
1> ]
1> and
1> [
1> _Ty=Ogre::String
1> ]
1> No constructor could take the source type, or constructor overload resolution was ambiguous

I will work on it.


26-05-2009 06:47:48

There are 8 lines to modify:

1) The line 305 of SimpleGrid.cpp and line 414, 422, 437 and 445 of Mesh.cpp must be modified from something like this:

mWorldMatrix = mEntity->getParentSceneNode()->_getFullTransform();

2) The line 306 of CfgFileManager.cpp must be set to

Ogre::vector<Ogre::String>::type Cmpnts = Ogre::StringUtil::split(CfgFile.getSetting("Components"), "|");

3) The line 290 of CfgFileManager.cpp to

bool CfgFileManager::_isStringInList(const Ogre::vector<Ogre::String>::type &List, const Ogre::String &Find)

4) The line 159 of CfgFileManager.h to:

static bool _isStringInList(const Ogre::vector<Ogre::String>::type &List, const Ogre::String &Find);

5) Might I also suggest to remove either HYDRAX_EXPORTS or HYDRAX_LIB from the vc8 files. It is confusing. Btw IMO using HYDRAX_EXPORTS is more explicit. For me HYDRAX_LIB is to compile a static version of the library.

6) I suggest to use an #if (OGRE_VERSION_MINOR < 7) #else #endif to make it backward compatible for the vector<string>

7) Also don't forget to set HAVE_OGRE_BUILDSETTINGS_H if you have some special settings (such as not using this *รง/"&**!!! NedAlloc.

8 ) Could you make the project as if it was an Ogre sample ? This would permit to have only relative paths and would make it much easier to compile the first time.

That's it.



13-07-2010 15:18:41

Are you sure that the right attribute is referred to as "::type"? I have tried this and ::type does not exist. I am now attempting a compile using ::value_type instead.


31-07-2010 03:20:47

The comment above happens to be incorrect, unlike the rest of the thread.


03-06-2011 17:47:11

I know this is an old post, however since I recently went to check out hydrax these instructions helped me immensely!
Thank you.

Something of note, there is now an Ogre::StringVector define which clears things up further from std::vector<Ogre::String>::type.

Oh, my bad: