View Single Post
Old 08-17-2003, 12:23 PM   #4
Yui Unifex
Senior Member
 
Join Date: Apr 2002
Location: Florida
Posts: 323
Yui Unifex is on a distinguished road
Send a message via ICQ to Yui Unifex Send a message via AIM to Yui Unifex
Question

These were the messages that I got:
[code] gcc -c -O -Wall -ggdb db.c
db.c;982;8; macro names must be identifiers
db.c; In function `load_resets';
db.c;942; warning; unused variable `pRoomIndex'
db.c;943; warning; unused variable `pexit'
db.c;932; warning; unused variable `buf'
db.c; In function `reset_area';
db.c;1525; warning; unused variable `pObjToIndex'
db.c; In function `find_string_references';
db.c;3031; warning; suggest explicit braces to avoid ambiguous `else'
db.c;3037; warning; suggest explicit braces to avoid ambiguous `else'
db.c;3050; warning; suggest explicit braces to avoid ambiguous `else'
db.c;3056; warning; suggest explicit braces to avoid ambiguous `else'
db.c;3069; warning; suggest explicit braces to avoid ambiguous `else'
db.c;3075; warning; suggest explicit braces to avoid ambiguous `else'
db.c;3088; warning; suggest explicit braces to avoid ambiguous `else'
db.c;3094; warning; suggest explicit braces to avoid ambiguous `else'
db.c;3107; warning; suggest explicit braces to avoid ambiguous `else'
db.c;3113; warning; suggest explicit braces to avoid ambiguous `else'
db.c;3126; warning; suggest explicit braces to avoid ambiguous `else'
db.c;3132; warning; suggest explicit braces to avoid ambiguous `else'
db.c;3142; warning; suggest explicit braces to avoid ambiguous `else'
db.c;3153; warning; suggest explicit braces to avoid ambiguous `else'
db.c;3159; warning; suggest explicit braces to avoid ambiguous `else'
db.c;3170; warning; suggest explicit braces to avoid ambiguous `else'
db.c;3176; warning; suggest explicit braces to avoid ambiguous `else'
db.c;3187; warning; suggest explicit braces to avoid ambiguous `else'
db.c;3193; warning; suggest explicit braces to avoid ambiguous `else'
db.c;3204; warning; suggest explicit braces to avoid ambiguous `else'
db.c;3210; warning; suggest explicit braces to avoid ambiguous `else'
db.c;3221; warning; suggest explicit braces to avoid ambiguous `else'
db.c;3227; warning; suggest explicit braces to avoid ambiguous `else'
make; *** [db.o] Error 1[/quote]

The only thing preventing you from compiling that file is the line:
db.c:982:8: macro names must be identifiers

This line is an #ifdef 0 line that essentially removes a section of code up until the #endif. 0 is not an identifier, so you need to give it a better name with #define. At the top of the source file I added #define COMPILESECTION 0, and then I changed that line to #ifdef COMPILESECTION and it worked as advertised. There were no other errors in the compilation, except an undefined reference to crypt which is also easily remedied.

Edit: Err, and that should really be #if instead of #ifdef =).
Yui Unifex is offline   Reply With Quote