Weird error when compiling source under Linux.


(Seph64) #1

I was trying to compile Captain Bob’s mod in Linux, but everytime I try I get this error:

gcc: cannot specify -o with -c or -S and multiple compilations
cons: *** [debug-x86-Linux--gcc3/cgame/src/cgame/cg_atmospheric.o] Error 1

My mod compiles fine under linux, but Captain Bob’s mod does not. I hope there is a simple solution.

Thanks in advance.


(CaptainBob1944) #2

Yes, any help is greatly appreciated. Another point to make it that everything compiles perfectly fine into a dll, no errors.


(SiliconSlick) #3

What version of gcc?

What is the “cons” command line you are using?

Are you setting any environment variables to override defaults?

What is the gcc command it is generating?

On RH7.3 (glibc2.2/gcc2.96), I get:


gcc -pipe -fsigned-char -DMISSIONPACK -D_DEBUG -g -Wall -O -fPIC -DCGAMEDLL -I/home/slick/headshot-mod/WET_Source.rmod.slick/src/game -I/home/slick/headshot-mod/WET_Source.rmod.slick/src/ui -c debug-x86-Linux-2.2/cgame/src/cgame/cg_atmospheric.c -o debug-x86-Linux-2.2/cgame/src/cgame/cg_atmospheric.o

And on RH9 (glibc2.3/gcc3.2.2):


gcc -pipe -fsigned-char -DMISSIONPACK -D_DEBUG -g -Wall -O -fPIC -DCGAMEDLL -I/home/slick/WET_Source/src/game -I/home/slick/WET_Source/src/ui -c debug-x86-Linux-2.3-gcc3/cgame/src/cgame/cg_atmospheric.c -o debug-x86-Linux-2.3-gcc3/cgame/src/cgame/cg_atmospheric.o

SiliconSlick


(Seph64) #4

GCC 2.95

cons is the one the comes with the source code.

No

gcc -pipe -fsigned-char -DMISSIONPACK -D_DEBUG -g -Wall -fPIC -DCGAMEDLL -I/root/Realism Source/src/game -I/root/Realism Source/src/ui -c debug-x86-Linux-2.2/cgame/src/cgame/cg_atmospheric.c -o debug-x86-Linux-2.2/cgame/src/cgame/cg_atmospheric.o

That’s under Slackware 8.1 with gcc 2.95 glibc 2.2


(SiliconSlick) #5

Lose the space in the directory name and try again.


mv /root/Realism\ Source /root/RealismSource

Or properly escape the space with a backslash
(which means a lot of changes to the cons scripts).

SiliconSlick (who never understood why people use spaces in filenames given the problems they cause)


(Seph64) #6

Yup, I knew the solution would have been simple. Thanks.