Help in compiling code
Noel Robertson
NARobertson@scs.dera.gov.uk
Mon Jun 19 03:46:00 GMT 2000
> I am having problems trying to re-compile and link, using GCC 2.8.1 on
> Solaris 2.6, the C code attached that was originally compiled using a Sun
> compiler as a shared object. I tried compiling and linking it using the
> commands saved in 'gcctext', and got the 'Undefined symbol' error when
> linking. Am I missing one the libraries in gcc?
>
> Any assistance in compiling the program to run on Solaris (sorry we don't
> use the gnu OS on our machines yet) would be much appreciated.
>
> <<spawn2.c>> <<gcctext>>
> Many thanks
>
> Noel
>
> Noel Robertson
> Space Department
> Room 1004
> Arthur C.Clarke Building
> DERA Farnborough
> Hampshire
> GU14 0LX
> United Kingdom
>
> Tel 44 01252 394264
> Fax 44 01252 396320
> Email narobertson@scs.dera.gov.uk
>
-------------- next part --------------
Script started on Mon 19 Jun 2000 11:11:33 AM BST
snip7w{dranar}1: gcc -g -c spawn2.c
snip7w{dranar}2: gcc -g -o spawn2.so spawn2.o -lm
Undefined first referenced
symbol in file
main /usr/local/lib/gcc-lib/sparc-sun-solaris2.7/2.8.1/crt1.o
ld: fatal: Symbol referencing errors. No output written to spawn2.so
snip7w{dranar}3: exit
snip7w{dranar}4:
script done on Mon 19 Jun 2000 11:15:45 AM BST
-------------- next part --------------
A non-text attachment was scrubbed...
Name: spawn2.c
Type: text/x-c
Size: 1472 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-bugs/attachments/20000619/7a36c68f/attachment.bin>
More information about the Gcc-bugs
mailing list