Title: Undeclared Error Post by: fetid_breath on April 30, 2005, 03:58:43 am I edited the src/sc2code/load.c
See http://uqm.stack.nl/cgi-bin/yabb/YaBB.pl?action=display;board=Gendiscuss;num=1086978888;start=0#3 Well When I went to build my changes, I got this: Code: gcc -o "obj/release/./src/sc2code/load.o" -c -I/usr/local/include/SDL -Dmain=SDL_main -I/usr/local/include/SDL -Dmain=SDL_main -O3 -DGFXMODULE_SDL -DHAVE_OPENGL -DSOUNDMODULE_SDL -DHAVE_ZIP=1 -I "." -I src -I src/sc2code -I src/sc2code/libs -I src/regex "src/sc2code/load.c" src/sc2code/load.c: In function `LoadGame': src/sc2code/load.c:197: error: `KOHR_AH_VICTORIOUS_EVENT' undeclared (first use in this function) src/sc2code/load.c:197: error: (Each undeclared identifier is reported only once src/sc2code/load.c:197: error: for each function it appears in.) make: *** [obj/release/./src/sc2code/load.o] Error 1 Anyone know how to fix this? Title: Re: Undeclared Error Post by: 0xDEC0DE on April 30, 2005, 04:32:05 am You'll need to make sure that load.c references src/sc2code/globdata.h
Typically, this is done at the top of the file with a line like this: Code: #include "globdata.h" Title: Re: Undeclared Error Post by: fetid_breath on April 30, 2005, 04:55:34 am Code: #include "globdata.h" is already in load.cIt still doesn't work. Title: Re: Undeclared Error Post by: 0xDEC0DE on April 30, 2005, 07:08:03 am Whoops, I got my names confused. Include gameev.h (in addition to the rest) to get the symbol definition you're after.
Sorry about that. Title: Re: Undeclared Error Post by: Culture20 on April 30, 2005, 11:51:52 am Stupid Programming Trick #337374:
Use a search method (Search for files containing text "X" in windows, grep "X" -r in *nix, where "X" is the text you're looking for) to find the function or variable name. Title: Re: Undeclared Error Post by: fetid_breath on April 30, 2005, 06:55:46 pm Thanks 0xdecode. I added:
#include "gameev.h" to the top of load.c and it got built fine. |