Linker error when compiling with GNU C/C++ compilers (SPARC) 3.0. 4
Harley Ken
Ken.Harley@services.fujitsu.com
Thu Jun 6 09:06:00 GMT 2002
Trying to build and link a shared object/library on Solaris 8, I get the
following error :-
ld: Software Generation Utilities - Solaris-ELF (4.0)
ld: fatal: file /export/home/harleyk/source/libgreet.so: unknown file type
ld: fatal: File processing errors. No output written to hello
Command line is :-
gcc -o hello hello.c -L/libdir -lgreet
Shared library libgreet.so created with :-
gcc -fpic -c temp.c
ld -o libgreet.so temp
Source is :-
Hello.c :-
/*hello.c*/
#include <stdio.h>
main ()
{
hello ();
}
temp.c :-
/*temp.c*/
hello()
{
printf ("Hell !\n");
}
Regards,
Ken Harley
Fujitsu Central Configuration Management
This e-mail is only for the use of its intended recipient. Its contents are
confidential and may be privileged. Fujitsu does not guarantee that this
e-mail has not been intercepted and amended or that it is virus-free.
Fujitsu, Eskdale Road, Winnersh, Wokingham, Berkshire, RG41 5TT
Tel: +44 (0) 118 3775054 Internal: 7303 5054
Fax: +44 (0) 118 3775068
E-mail: Ken.Harley@services.fujitsu.com
Web: www.fujitsu.com <http://www.fujitsu.com>
More information about the Gcc-help
mailing list