PDA

View Full Version : MSVC doesn't like identify.c


ekolis
August 6, 2009, 23:19
Hmm, spent a bit of time piecing this together, seeing as I don't know much about C... but apparently, identify.c from r1622 won't compile in MSVC - for some reason, you have to have all your variable declarations up at the top of the function before you do anything else, and object_notice_ego was violating this rule! Changing this allowed the game to compile, though. Just thought I'd let you know :)

zaimoni
August 7, 2009, 01:21
Hmm, spent a bit of time piecing this together, seeing as I don't know much about C... but apparently, identify.c from r1622 won't compile in MSVC - for some reason, you have to have all your variable declarations up at the top of the function before you do anything else, and object_notice_ego was violating this rule! Changing this allowed the game to compile, though. Just thought I'd let you know :)C89 requires all variable declarations up at the top of the function before doing anything else.

C99 follows C++ in this regard.