Hi, I'm trying to get the SVN version of vegastrike on my ubuntu 5.25.
I'm, having problems with the "make vegastrike" step, but I'm a real noob with cvs/svn systems.
I followed this tutorial and everything works except "make vegastrike" (even "make soundserver" succeeded)
When I launch "make vegastrike" this is what I get:
cod@CoD-3:~/VegaStrike/vegastrike$ make vegastrike
if g++ -DHAVE_CONFIG_H -I. -I. -I. -I./boost/1_33 -DHAVE_SDL=1 -DSDL_WINDOWING=1 -I/usr/local/include -I/usr/include/python2.4 -DHAVE_PYTHON=1 -I./src -DBISON -g -O2 -pipe -falign-loops=2 -falign-jumps=2 -falign-functions=2 -I/usr/include/SDL -D_REENTRANT -pthread -pipe -MT src/gfx/vegastrike-ani_texture.o -MD -MP -MF "src/gfx/.deps/vegastrike-ani_texture.Tpo" -c -o src/gfx/vegastrike-ani_texture.o `test -f 'src/gfx/ani_texture.cpp' || echo './'`src/gfx/ani_texture.cpp; \
then mv -f "src/gfx/.deps/vegastrike-ani_texture.Tpo" "src/gfx/.deps/vegastrike-ani_texture.Po"; else rm -f "src/gfx/.deps/vegastrike-ani_texture.Tpo"; exit 1; fi
src/gfx/ani_texture.cpp: In member function ‘virtual void AnimatedTexture::setTime(double)’:
src/gfx/ani_texture.cpp:129: error: ‘min’ was not declared in this scope
src/gfx/ani_texture.cpp:130: error: ‘min’ was not declared in this scope
src/gfx/ani_texture.cpp:150: error: ‘max’ was not declared in this scope
src/gfx/ani_texture.cpp: In member function ‘void AnimatedTexture::AniInit()’:
src/gfx/ani_texture.cpp:196: warning: converting negative value ‘-0x00000000000000001’ to ‘unsigned int’
src/gfx/ani_texture.cpp: In member function ‘void AnimatedTexture::Reset()’:
src/gfx/ani_texture.cpp:265: warning: converting negative value ‘-0x00000000000000001’ to ‘unsigned int’
make: *** [src/gfx/vegastrike-ani_texture.o] Error 1
I can't understand if it's me mistaking something or if there's some error in the source code of src/gfx/ani_texture.cpp.
During the last few days, about every second
revision/change of the source code broke building
for me. Try again tomorrow, maybe the problem
has been fixed until then. Alternatively, try to
check out revision 10375, I could successfully build
that one yesterday.
if g++ -DHAVE_CONFIG_H -I. -I. -I. -I./boost/1_33 -DHAVE_SDL=1 -DSDL_WINDOWING=1 -DHAVE_AL=1 -DHAVE_OGG -I/usr/include/python2.4 -DHAVE_PYTHON=1 -I./src -DBISON -g -O2 -pipe -falign-loops=2 -falign-jumps=2 -falign-functions=2 -I/usr/include/SDL -D_REENTRANT -pthread -pipe -MT src/gfx/vegastrike-ani_texture.o -MD -MP -MF "src/gfx/.deps/vegastrike-ani_texture.Tpo" \
-c -o src/gfx/vegastrike-ani_texture.o `test -f 'src/gfx/ani_texture.cpp' || echo './'`src/gfx/ani_texture.cpp; \
then mv -f "src/gfx/.deps/vegastrike-ani_texture.Tpo" "src/gfx/.deps/vegastrike-ani_texture.Po"; \
else rm -f "src/gfx/.deps/vegastrike-ani_texture.Tpo"; exit 1; \
fi
src/gfx/ani_texture.cpp: In member function `virtual void
AnimatedTexture::setTime(double)':
src/gfx/ani_texture.cpp:129: error: `min' undeclared (first use this function)
src/gfx/ani_texture.cpp:129: error: (Each undeclared identifier is reported
only once for each function it appears in.)
src/gfx/ani_texture.cpp:150: error: `max' undeclared (first use this function)
src/gfx/ani_texture.cpp: In member function `void AnimatedTexture::AniInit()':
src/gfx/ani_texture.cpp:196: warning: converting of negative value `-1' to `
unsigned int'
src/gfx/ani_texture.cpp: In member function `void AnimatedTexture::Reset()':
src/gfx/ani_texture.cpp:265: warning: converting of negative value `-1' to `
unsigned int'
make: *** [src/gfx/vegastrike-ani_texture.o] Error 1
I know this doesn't help to solve this problem but: Hasn't there been the common agreenment that only those things/changes that build should be committed to the repository? For other things: do them at home or do a temporary branch. The current practice doesn't always seem to follow this.
The problem is that what builds on one compiler not always does on others.
I have sometimes commited things that don't build myself, when they build under VC8 but not under GCC. It happens.
Not everyone has the possibility/patience to try building on multiple platforms before commiting.
I had the same build error on my linux machine. Replacing "max" with "std::max" and "min" with "std::min", respectively, in the files of question does the job. These changes have to be made in two files "src/gldrv/gl_misc.cpp" and "src/gfx/ani_texture.cpp".
Does this fix destroy the build on windoze? Who can check that?