I tried to merge master into my physicsaedra3 branch, I am getting build errors. I am on windows.
Error 65 error C2440: 'initializing' : cannot convert from 'int' to 'MWWorld::CellStore *' c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\utility 163
Error 66 error C2439: 'std::_Pair_base<_Ty1,_Ty2>::second' : member could not be initialized c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\utility 163
Error 86 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\a\openmw\apps\openmw\mwworld\player.hpp 86
Error 87 error C2143: syntax error : missing ',' before '&' c:\a\openmw\apps\openmw\mwworld\player.hpp 86
Error 88 error C2146: syntax error : missing ';' before identifier 'getDrawState' c:\a\openmw\apps\openmw\mwworld\player.hpp 118
Error 89 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\a\openmw\apps\openmw\mwworld\player.hpp 118
Error 90 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\a\openmw\apps\openmw\mwworld\player.hpp 118
97 IntelliSense: cannot open source file "refdata.hpp" c:\a\openmw\apps\openmw\mwworld\cellstore.hpp 13
Any help would be great
Problem with current master - Windows
Re: Problem with current master - Windows
Looks odd. Maybe the merge went wrong. Or your build system got confused. Did you try a complete rebuild?
Re: Problem with current master - Windows
Tried rebuild, same problem. Will try doing a clone of master and building it.
Re: Problem with current master - Windows
OK, I just cloned your current master Zini. I am having the exact same compiler errors.
I am guessing this is a windows only problem introduced by recent changes.
I am guessing this is a windows only problem introduced by recent changes.
Re: Problem with current master - Windows
Very strange stuff. Also very unhelpful error messages, assuming that is all the error messages you got. Sorry, out of ideas at the moment.
Re: Problem with current master - Windows
The problem seems to be that windows assumes that a constant integer can't be implicitly converted to a pointer value in the constructor. I've pushed a fix.
I also took the liberty of fixing another issue that caused my build to fail (DrawState was defined to DrawStateA), and got rid of a few warning that weren't very major. (Never used variables, a missing virtual destructor and a warning that const doesn't necessarily override non-const. Besides, why was a normal unsigned int set as const anyway?)
I also took the liberty of fixing another issue that caused my build to fail (DrawState was defined to DrawStateA), and got rid of a few warning that weren't very major. (Never used variables, a missing virtual destructor and a warning that const doesn't necessarily override non-const. Besides, why was a normal unsigned int set as const anyway?)
Re: Problem with current master - Windows
Don't know. People do weird things sometimes. Coding before the first morning coffee/tea?Besides, why was a normal unsigned int set as const anyway?)
Anyway, as I wrote in the pull request, this needs to be fixed properly. We can't afford to have including one of our headers randomly breaking the Windows build.
Re: Problem with current master - Windows
Seeing as I have no idea how to undefine all of the standard windows defines, I don't even know all of them, I think it would be best just to rename DrawState to something else. RenderState perhaps?
Also, on your comment about the deprecated CellStore, I just casted the zero to what the rest of the code said was being used. Although I guess I could go about switching MWWorld::Ptr::CellStore to MWWorld::CellStore if you want me to.
Also, on your comment about the deprecated CellStore, I just casted the zero to what the rest of the code said was being used. Although I guess I could go about switching MWWorld::Ptr::CellStore to MWWorld::CellStore if you want me to.
Re: Problem with current master - Windows
Our DrawState is about drawing a weapon or magic. Nothing to do with rendering.Seeing as I have no idea how to undefine all of the standard windows defines, I don't even know all of them, I think it would be best just to rename DrawState to something else. RenderState perhaps?
MWWorld::Ptr::CellStore is a typedef for MWWOrld::CellStore and it will be removed eventually (a task for a release sometimes in the future). No point in replacing MWWorld::Ptr::CellStore now. Just don't add any new ones.Also, on your comment about the deprecated CellStore, I just casted the zero to what the rest of the code said was being used. Although I guess I could go about switching MWWorld::Ptr::CellStore to MWWorld::CellStore if you want me to.
Re: Problem with current master - Windows
On a second thought, considering that I am currently working on an area that makes heavy use of DrawState, I will take care of it myself. I still hate Windoze. And it is very poor style of OGRE to force the bloody Windows.h on all of us by including it in some of its own headers.