cc: cannot specify -o with -c or -S and multiple compilation

pkishor

2002-04-21 06:04:00

That's the summary of the message... I am trying to compile a program. The program compiles fine, but it also has another sub-program, actually a PHP module sitting in a sub-directory. That's the one that croaks with the above message. The full message is like so...

cd mapscript/php3; make; cd ../..
cc cc -I. -I.. -O2 -Wall -DCOMPILE_DL=1 -DPHP4 -DUSE_WMS -DUSE_PROJ -DUSE_PROJ_API_H -DUSE_EPPL -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DUSE_JPEG -I/Users/pkishor/Projects/mapserver_3.5 -I/usr/local/include -I/Users/pkishor/Projects/php-4.0.6 -I/Users/pkishor/Projects/php-4.0.6/dl -I/Users/pkishor/Projects/php-4.0.6/main -I/Users/pkishor/Projects/php-4.0.6/Zend -I/Users/pkishor/Projects/php-4.0.6/include -I/Users/pkishor/Projects/php-4.0.6/TSRM -I/usr/local/apache/include -c -o php_mapscript_util.o php_mapscript_util.c
cc: cannot specify -o with -c or -S and multiple compilations
make[1]: *** [php_mapscript_util.o] Error 1

What to do?

Tia.

apex

2002-04-22 18:10:00

Remove -c. [img]images/icons/smile.gif"%20border="0[/img]

targus

2002-07-31 02:30:00

remove the -o php_mapscript_util.o from the build
line. -c tells the compiler to build a .o file that is not bound to any libraries. By removing -c, you would be creating a bound (executable) program.