little help please

Posted by Exopaladin on Tue 11 Sep 2001 12:56 PM — 4 posts, 16,479 views.

#0
hi, I am trying to compile SWR with Cygwin without much success so I was wondering if anyone could help me
Australia Forum Administrator #1
Can you tell us what is going wrong - eg. copy and paste the error messages from the compile.
#2
gcc -c -g3 -Wall save.c
save.c:28: sys/dir.h: No such file or directory

then if I // the sys/dir.h line it comes up with:

save.c: In function `load_char_obj':
save.c:913: warning: suggest explicit braces to avoid ambiguous `else'
save.c: In function `load_corpses':
save.c:2041: `DIR' undeclared (first use in this function)
save.c:2041: (Each undeclared identifier is reported only once
save.c:2041: for each function it appears in.)
save.c:2041: `dp' undeclared (first use in this function)
save.c:2041: warning: statement with no effect
save.c:2042: parse error before `struct'
save.c:2047: warning: implicit declaration of function `opendir'
save.c:2054: `falling' undeclared (first use in this function)
save.c:2055: `de' undeclared (first use in this function)
save.c:2055: warning: implicit declaration of function `readdir'
save.c:2059: `strArea' undeclared (first use in this function)
save.c:2061: `fpArea' undeclared (first use in this function)
save.c:2100: warning: implicit declaration of function `closedir'
make[1]: *** [save.o] Error 1
make[1]: Leaving directory `/cygdrive/g/dist/src'
make: *** [all] Error 2

Australia Forum Administrator #3
Looks like this line is not being included (near the start):



#ifndef WIN32
#include <dirent.h>
#endif


Although you are on Win32 the ifndef was only supposed to be used for the Microsoft compiler. I would comment out those two lines, like this:



// #ifndef WIN32
#include <dirent.h>
// #endif