Visual Studio compiler error from comment. Yep just happened

A place for Ogre users to discuss non-Ogre subjects with friends from the community.
Post Reply
User avatar
Mind Calamity
Ogre Magi
Posts: 1255
Joined: Sat Dec 25, 2010 2:55 pm
Location: Macedonia
x 81

Visual Studio compiler error from comment. Yep just happened

Post by Mind Calamity »

Excuse the horrible title, but what the hell just happened ?

[youtube]tARZPOHvxyM[/youtube]

Apparently commented out code can still cause errors. :lol:

Wrapping it in a multi-line comment fixes it tho: http://prntscr.com/5p24zo
BitBucket username changed to iboshkov (from MindCalamity)
Do you need help? What have you tried?
- xavier
---------------------
HkOgre - a Havok Integration for OGRE | Simple SSAO | My Blog | My YouTube | My DeviantArt
User avatar
insider
Orc
Posts: 462
Joined: Thu Sep 15, 2011 12:50 pm
x 31

Re: Visual Studio compiler error from comment. Yep just happ

Post by insider »

:lol:
User avatar
Zonder
Ogre Magi
Posts: 1178
Joined: Mon Aug 04, 2008 7:51 pm
Location: Manchester - England
x 76

Re: Visual Studio compiler error from comment. Yep just happ

Post by Zonder »

My guess is debug symbols aren't up to date, it usually knows this though and indicates the source/pdb isn't up to date
There are 10 types of people in the world: Those who understand binary, and those who don't...
TheSHEEEP
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 972
Joined: Mon Jun 02, 2008 6:52 pm
Location: Berlin
x 65

Re: Visual Studio compiler error from comment. Yep just happ

Post by TheSHEEEP »

U wot m8?! ;)
My site! - Have a look :)
Also on Twitter - extra fluffy
User avatar
Mind Calamity
Ogre Magi
Posts: 1255
Joined: Sat Dec 25, 2010 2:55 pm
Location: Macedonia
x 81

Re: Visual Studio compiler error from comment. Yep just happ

Post by Mind Calamity »

I did a clean/rebuild a few times too, nothing helped, I guess VC++ has a drinking problem. :lol:
BitBucket username changed to iboshkov (from MindCalamity)
Do you need help? What have you tried?
- xavier
---------------------
HkOgre - a Havok Integration for OGRE | Simple SSAO | My Blog | My YouTube | My DeviantArt
User avatar
Klaim
Old One
Posts: 2565
Joined: Sun Sep 11, 2005 1:04 am
Location: Paris, France
x 56
Contact:

Re: Visual Studio compiler error from comment. Yep just happ

Post by Klaim »

Did you report this bug?
User avatar
Xavyiy
OGRE Expert User
OGRE Expert User
Posts: 847
Joined: Tue Apr 12, 2005 2:35 pm
Location: Albacete - Spain
x 87

Re: Visual Studio compiler error from comment. Yep just happ

Post by Xavyiy »

Something similar happened to me some months ago at work.

The problem was a copy-pasted code from an internal website, that somehow included some hidden(non visible) & non-valid characters, driving crazy the compiler.

Try to copy-paste your code to a new notepad document, remove the file, re-recreate it and finally copy-paste the code from notepad. It worked for me, after some minutes of "WTF is going on here" :twisted: .

Cheers!
User avatar
Klaim
Old One
Posts: 2565
Joined: Sun Sep 11, 2005 1:04 am
Location: Paris, France
x 56
Contact:

Re: Visual Studio compiler error from comment. Yep just happ

Post by Klaim »

Xavyiy wrote:Something similar happened to me some months ago at work.

The problem was a copy-pasted code from an internal website, that somehow included some hidden(non visible) & non-valid characters, driving crazy the compiler.

Try to copy-paste your code to a new notepad document, remove the file, re-recreate it and finally copy-paste the code from notepad. It worked for me, after some minutes of "WTF is going on here" :twisted: .

Cheers!

Ah yes I got something similar at some point.
al2950
OGRE Expert User
OGRE Expert User
Posts: 1227
Joined: Thu Dec 11, 2008 7:56 pm
Location: Bristol, UK
x 157

Re: Visual Studio compiler error from comment. Yep just happ

Post by al2950 »

Klaim wrote:
Xavyiy wrote:Something similar happened to me some months ago at work.

The problem was a copy-pasted code from an internal website, that somehow included some hidden(non visible) & non-valid characters, driving crazy the compiler.

Try to copy-paste your code to a new notepad document, remove the file, re-recreate it and finally copy-paste the code from notepad. It worked for me, after some minutes of "WTF is going on here" :twisted: .

Cheers!

Ah yes I got something similar at some point.
Me too! Note to self, never copy & paste code! Still do it though :oops:
User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7157
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 538

Re: Visual Studio compiler error from comment. Yep just happ

Post by Kojack »

In particular, powerpoint and pdf like to modify symbols like plus, minus, single and double quotes into ones that look almost identical in the font but are different ascii codes so VS doesn't understand them.
User avatar
Zonder
Ogre Magi
Posts: 1178
Joined: Mon Aug 04, 2008 7:51 pm
Location: Manchester - England
x 76

Re: Visual Studio compiler error from comment. Yep just happ

Post by Zonder »

ah yest the old joke of changing a semicolon to a greek question mark :twisted:
There are 10 types of people in the world: Those who understand binary, and those who don't...
User avatar
Mind Calamity
Ogre Magi
Posts: 1255
Joined: Sat Dec 25, 2010 2:55 pm
Location: Macedonia
x 81

Re: Visual Studio compiler error from comment. Yep just happ

Post by Mind Calamity »

That's just evil :P

Anyways I didn't copy code from any documents, it was from another source file, at least the pixel skip calculation was from there, but that shouldn't happen as it's still plaintext.

I also noticed a bug with undo, it happens almost always if you undo a lot of stuff, and then redo it you get a huge mess of re-arranged/broken code, I'm not sure if this is related to Visual Assist or if it's a pure Visual Studio bug.

I'll look into reporting the comment bug, but I don't know how to reproduce it, so I doubt it'd be of much use.
BitBucket username changed to iboshkov (from MindCalamity)
Do you need help? What have you tried?
- xavier
---------------------
HkOgre - a Havok Integration for OGRE | Simple SSAO | My Blog | My YouTube | My DeviantArt
Post Reply