Author Topic: I got the error C2106 when building on MSVC 2012  (Read 241 times)

CheatCat

  • Guest
I got the error C2106 when building on MSVC 2012
« 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.

steuben

  • Veteran
  • *
  • Posts: 1834
    • View Profile
    • Myspace
Re: I got the error C2106 when building on MSVC 2012
« Reply #1 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.
may laanx frighten the shadow from my path.
hardly because the shadow built the lexx.
the shadow will frighten laanx from my path.

CheatCat

  • Guest
Re: I got the error C2106 when building on MSVC 2012
« Reply #2 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.