Author Topic: Getting wrong error line with vc++  (Read 3953 times)

Offline Pitti

  • Single posting newcomer
  • *
  • Posts: 5
Getting wrong error line with vc++
« on: August 12, 2014, 05:29:15 pm »
Hi,

I'm a little confused. I'm working with Code::Blocks 13.12 and a Visual C++ (2011) toolchain to compile a DLL Runtime Library. In fact, everything is working fine, except the build message log. When something is wrong in my code I'm getting a correct compiler error message, but referring to the wrong line of code. Eg. line 145 instead 248. I played around with some compiler flags like disabling optimizations and so on, but no luck.

Any ideas?

Thanks in advance,
Peter

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: Getting wrong error line with vc++
« Reply #1 on: August 12, 2014, 06:24:52 pm »
Post the build log with the warning in it.
NOTE: Build log NOT the Build message!

Edit: The Advanced Compiler settings likely need to be changed for the warning.

Tim S.
« Last Edit: August 12, 2014, 06:27:11 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Pitti

  • Single posting newcomer
  • *
  • Posts: 5
Re: Getting wrong error line with vc++
« Reply #2 on: August 12, 2014, 06:40:50 pm »
Code
-------------- Build: Maya 2015 Release Win64 in raycastPointCmd (compiler: Microsoft Visual C++ 2011 x64)---------------

x86_amd64\cl.exe /nologo  /MTd /EHac /DWIN64 /D_CONSOLE /DNT_APP /DREQUIRE_IOSTREAM /DNT_PLUGIN   /IE:\Coding\CodeBlocks\..\MayaRessources\Maya2015.x64\include /I"E:\Coding\CodeBlocks\..\Microsoft\Microsoft SDKs\Windows\v7.1\include" /I"E:\Coding\CodeBlocks\..\Microsoft\Microsoft Visual Studio 11.0\VC\include" /c src\raycastPointCmd.cpp /FoRelease\Maya2015.x64\src\raycastPointCmd.obj
raycastPointCmd.cpp

src\raycastPointCmd.cpp(145) : error C2039: 'length': Ist kein Element von 'MItSelectionList'

The error message itself is eligible, but the correct line of code should be 277 not 145. Sorry, the error message is in german. I've trouble to get the cl.exe output in english. Maybe the compiler itself is the problem, but I've no idea what's going on.

Thank you,
Peter


Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Getting wrong error line with vc++
« Reply #3 on: August 12, 2014, 06:53:50 pm »
So it's not Code::Blocks that is wrong, but your compiler gives an incorrect output.

That means your question is out of the scope of this forum/website and therefore violates our forum rules.

Offline Pitti

  • Single posting newcomer
  • *
  • Posts: 5
Re: Getting wrong error line with vc++
« Reply #4 on: August 12, 2014, 07:01:01 pm »
Ok, sorry for that.

Nevertheless, I thank you.

Peter