News:

Come Chat with us live! Learn how HERE!

Main Menu

Compile Errors

Started by Noyesdude, May 29, 2012, 07:36:09 AM

Noyesdude

I'm using make in windows with minGW32 and I've got no idea whats going on with this >.<  This is the whole section after I type in make.


make -C src/tools/lcc install
make[1]: Entering directory `/c/Tremulous/Tremulous-1.1.0-src/src/tools/lcc'
install -s -m 0755 build-mingw32-x86/q3lcc.exe ../
install -s -m 0755 build-mingw32-x86/q3cpp.exe ../
install -s -m 0755 build-mingw32-x86/q3rcc.exe ../
make[1]: Leaving directory `/c/Tremulous/Tremulous-1.1.0-src/src/tools/lcc'
make -C src/tools/asm install
make[1]: Entering directory `/c/Tremulous/Tremulous-1.1.0-src/src/tools/asm'
gcc -O2 -Wall -Werror -fno-strict-aliasing -o q3asm q3asm.c cmdlib.c
q3asm.c: In function 'TryAssembleENDPROC':
q3asm.c:959:10: error: variable 'v2' set but not used [-Werror=unused-but-set-va
riable]
q3asm.c:959:7: error: variable 'v' set but not used [-Werror=unused-but-set-vari
able]
cc1.exe: all warnings being treated as errors

cmdlib.c: In function 'ExpandPath':
cmdlib.c:316:6: error: the address of 'qdir' will always evaluate as 'true' [-We
rror=address]
cmdlib.c: In function 'ExpandGamePath':
cmdlib.c:329:6: error: the address of 'qdir' will always evaluate as 'true' [-We
rror=address]
cc1.exe: all warnings being treated as errors


If anything else is needed I'll supply it as soon as I can

Thanks in advance
   Noyesdude
Co-creater of the Pbot installation guide(http://xserverx.com/forum/viewtopic.php?f=44&t=2352) on XserverX, and Tremulous player. and btw its No-yes-dude :D

/dev/humancontroller

Quote from: Noyesdude on May 29, 2012, 07:36:09 AM
I'm using make in windows with minGW32 and I've got no idea whats going on with this >.<  This is the whole section after I type in make.


make -C src/tools/lcc install
make[1]: Entering directory `/c/Tremulous/Tremulous-1.1.0-src/src/tools/lcc'
install -s -m 0755 build-mingw32-x86/q3lcc.exe ../
install -s -m 0755 build-mingw32-x86/q3cpp.exe ../
install -s -m 0755 build-mingw32-x86/q3rcc.exe ../
make[1]: Leaving directory `/c/Tremulous/Tremulous-1.1.0-src/src/tools/lcc'
make -C src/tools/asm install
make[1]: Entering directory `/c/Tremulous/Tremulous-1.1.0-src/src/tools/asm'
gcc -O2 -Wall -Werror -fno-strict-aliasing -o q3asm q3asm.c cmdlib.c
q3asm.c: In function 'TryAssembleENDPROC':
q3asm.c:959:10: error: variable 'v2' set but not used [-Werror=unused-but-set-va
riable]
q3asm.c:959:7: error: variable 'v' set but not used [-Werror=unused-but-set-vari
able]
cc1.exe: all warnings being treated as errors

cmdlib.c: In function 'ExpandPath':
cmdlib.c:316:6: error: the address of 'qdir' will always evaluate as 'true' [-We
rror=address]
cmdlib.c: In function 'ExpandGamePath':
cmdlib.c:329:6: error: the address of 'qdir' will always evaluate as 'true' [-We
rror=address]
cc1.exe: all warnings being treated as errors

PROBLEM?
Quote from: ~Noyesdude
How do I fix these compile errors?
stop using the 1.1.0 source code, which is ~6.5 years old. get a newer version.

a workaround is to not pass -Werror to the compiler.

the fix is to edit the code:

     
  • in cmdlib.c, change both occurrences of

if (!qdir)

to

if (!qdir[0])

 
  • in q3asm.c, remove

int v, v2;

and change

v = ParseValue(); // locals
v2 = ParseValue(); // arg marshalling

to

ParseValue(); // locals
ParseValue(); // arg marshalling


Noyesdude

Thanks for helping.

I'll see about getting the newer code in the near future.
Co-creater of the Pbot installation guide(http://xserverx.com/forum/viewtopic.php?f=44&t=2352) on XserverX, and Tremulous player. and btw its No-yes-dude :D