Errror compilation under VS2005

CrapCrap

24-01-2009 16:50:36

Hi everybody

I've download the svn version of NxOgre and followed the gettingstarted tutoorial
But when I compile, I have this error :
error C2440: 'initializing' : cannot convert from 'std::vector<_Ty,_Ax>' to 'std::vector<_Ty>'

In the file nxogrecontainer.h at the third line :
void parseCSString(const NxString& str) {
static const std::string delims = " \t\r";
std::vector<NxString> d = Ogre::StringUtil::split(str,",");,",");



I'm using VS 2005. Could you help me please ?

toglia

26-02-2009 03:26:24

Got the same thing here. Its a very crazy issue. Google only finds like 2 matches, and this is one of them...

Strange thing is that if I compile NxOgre 0.9 with Ogre 1.6.1 precompiled headers or even the original release code I didn't get any errors. But If I compile it againt the actual 1.6.1 trunk code I get that crazy thing. For me, I need to compile it againt the trunk cause it has a very particular multihead implementation.

I will download the trunk again, just in case.

I have VS 2008.

toglia

26-02-2009 05:32:39

Still giving the same error although the trunk compiled perfectly but. I'm guessing maybe the Ogre::StringUtil::split changed...

toglia

26-02-2009 08:18:09

OK, I got it. To make it compile with the trunk project I changed:

std::vector<NxString> d = Ogre::StringUtil::split(p,",");
for
Ogre::StringVector d = Ogre::StringUtil::split(p,",");

and

for(std::vector<NxString>::iterator it = d.begin();it != d.end();++it) {
for
Ogre::StringVector::iterator it, iend;
iend = d.end();
for (it = d.begin(); it != iend; ++it){