Problem with current master - Windows

Support for running, installing or compiling OpenMW

Before you submit a bug report for the first time, please read: Bug reporting guidelines
Locked
jhooks1
Posts: 780
Joined: 06 Aug 2011, 21:34

Problem with current master - Windows

Post by jhooks1 »

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
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Problem with current master - Windows

Post by Zini »

Looks odd. Maybe the merge went wrong. Or your build system got confused. Did you try a complete rebuild?
jhooks1
Posts: 780
Joined: 06 Aug 2011, 21:34

Re: Problem with current master - Windows

Post by jhooks1 »

Tried rebuild, same problem. Will try doing a clone of master and building it.
jhooks1
Posts: 780
Joined: 06 Aug 2011, 21:34

Re: Problem with current master - Windows

Post by jhooks1 »

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.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Problem with current master - Windows

Post by Zini »

Very strange stuff. Also very unhelpful error messages, assuming that is all the error messages you got. Sorry, out of ideas at the moment.
User avatar
Ace (SWE)
Posts: 887
Joined: 15 Aug 2011, 14:56

Re: Problem with current master - Windows

Post by Ace (SWE) »

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?)
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Problem with current master - Windows

Post by Zini »

Besides, why was a normal unsigned int set as const anyway?)
Don't know. People do weird things sometimes. Coding before the first morning coffee/tea?

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.
User avatar
Ace (SWE)
Posts: 887
Joined: 15 Aug 2011, 14:56

Re: Problem with current master - Windows

Post by Ace (SWE) »

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.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Problem with current master - Windows

Post by Zini »

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?
Our DrawState is about drawing a weapon or magic. Nothing to do with rendering.
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.
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.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Problem with current master - Windows

Post by Zini »

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.
Locked