PlaneShift

Development => Development Deliberation => Topic started by: CheatCat on February 21, 2014, 04:53:25 am

Title: I got the error C2106 when building on MSVC 2012
Post by: CheatCat on February 21, 2014, 04:53:25 am
I am trying to build a x64 version of planeshift, revision 9282 in Microsoft Visual Studio (Ultimate) 2012. I got a really strange and hard to track error about the visual studios own string.h file! The error is not that descriptive:
Code: [Select]
error C2106: '=' : left operand must be l-value
It seems that it happens when compiling the libgui project. Crystal Space compiled without any problems and so did the libpaws, libpsutil and libpsnet projects. Compiling the single file pawswritingwindow.cpp seem to generate this kind of errors and probably several other files as well. I think it is something about the file net/cmdbase.h, witch itself compiles well but occur this error when are used in the class pawsWritingWindow. Perhaps something about the MsgEntry class?

There are an IsInt function somewhere also that hint that it can cause this problem, but I cannot find what calls that function when compiling pawswritingwindow.cpp.

If anyone know something I could try, I would be happy to try it.
Title: Re: I got the error C2106 when building on MSVC 2012
Post by: steuben on February 21, 2014, 06:16:29 am
what's the full line? i had something similar... i can't remember where. there something about a varable name not being a variable... or something like that.
Title: Re: I got the error C2106 when building on MSVC 2012
Post by: CheatCat on February 21, 2014, 07:34:25 am
It is really just:

Code: [Select]
4>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string(557): error C2106: '=' : left operand must be l-value
I wish there was some way to trace that error, see what the previous compiled line was or something.