Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Shadow95 on September 11, 2009, 10:26:46 am
-
Hi All,
Since some days, I have an error to build svn fs2:
ai/aicode.cpp: In function ‘void init_ai_class(ai_class*)’:
ai/aicode.cpp:560: error: ‘INT_MIN’ was not declared in this scope
ai/aicode.cpp: In function ‘void parse_ai_class()’:
test build on Mandriva 2009 Spring (GCC 4.3.2) and on Mandriva cooker (GCC 4.4.1)
Best regard
Shadow95
-
Is it from trunk or from the 3.6.10 branch?
If trunk, do you really need it, or would 3.6.10 be enough?
-
Is it from trunk or from the 3.6.10 branch?
If trunk, do you really need it, or would 3.6.10 be enough?
Pretty sure it's from trunk. Pretty sure it's my code, in fact.
Definitely needs to be fixed. Apparently the include that defines INT_MIN doesn't work on Linux... can any other linux compilers verify this?
EDIT:
My best guess is that we need to add this line to the top of aicode.cpp:
#include <limits.h>
However, since I'm not set up to compile on Linux, I can't verify that.
-
Hi,
on Trunk
Cheers
Shadow95
-
Hi Sushi
so, this error is deleted with #include <limits.h> in aicode.cpp, but after i have theses errors now :
make[1]: entrant dans le répertoire « /home/xavier/Sources/fs2open/code »
g++ -m64 -march=athlon64 -ansi -pedantic -DLUA_USE_LINUX -g -Os -Wall -funroll-loops -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -fsigned-char -Wno-unknown-pragmas -Wno-deprecated -Wno-char-subscripts -I../lua -g -L/usr/lib64 -lSDL -lvorbis -lm -lvorbisfile -ltheora -logg -lGL -lGLU -lopenal -o fs2_open_r freespace.o levelpaging.o libcode.a ../libjpeg/libjpeg.a ../lua/liblua.a
freespace.o: In function `load_animating_pointer(char*, int, int)':
/home/xavier/Sources/fs2open/code/freespace2/freespace.cpp:7832: undefined reference to `Error(char const*, int, char const*, ...)'
freespace.o: In function `game_render_frame_setup()':
/home/xavier/Sources/fs2open/code/freespace2/freespace.cpp:3535: undefined reference to `Error(char const*, int, char const*, ...)'
freespace.o: In function `game_level_close()':
/home/xavier/Sources/fs2open/code/freespace2/freespace.cpp:1013: undefined reference to `Error(char const*, int, char const*, ...)'
/usr/bin/ld: Dwarf Error: Offset (102756) greater than or equal to .debug_str size (49255).
libcode.a(aicode.o): In function `ai_find_path(object*, int, int, int, int)':
/home/xavier/Sources/fs2open/code/ai/aicode.cpp:2919: undefined reference to `Error(char const*, int, char const*, ...)'
libcode.a(aicode.o): In function `process_subobjects(int)':
/home/xavier/Sources/fs2open/code/ai/aicode.cpp:11223: undefined reference to `Error(char const*, int, char const*, ...)'
libcode.a(aicode.o):/home/xavier/Sources/fs2open/code/ai/aicode.cpp:3201: more undefined references to `Error(char const*, int, char const*, ...)' follow
collect2: ld a retourné 1 code d'état d'exécution
make[1]: *** [fs2_open_r] Erreur 1
Cheers
Xavier
-
It's the same for me on Ubuntu 9.04 x86_64. I can't compile, with the same error !
-
compiling under MacOS X 10.6.1 trunk 5592 is broken, too
-
edit: removed, practically a reprint of what shadow posted..
-
This might be a woopsies related to a change I made last night.
I forgot to update stubs.cpp.
Should be fixed now.
Thanks for the report!
-
Hi Portej05,
It's good now, build work !
For Sushi : add these lines after # include <map> in aicode.cpp and build it on windows and linux:
#ifdef __GNUC__
#include <limits.h>
#endif
Cheers
Shadow95
-
Can someone else building on Linux verify that adding
#include <limits.h>
to aicode.cpp fixes build errors? Or at least doesn't break anything (although I don't see why it should)?
If so, we can go ahead and pop it into trunk.
-
Yes, working fine.
-
I reckon commit it - I can't see any reason why it would break anything (MS CRT has a different include pattern in places to the GCC include patterns).