* Linker error when compiling with GNU C/C++ compilers (SPARC) 3.0. 4
@ 2002-06-06 9:06 Harley Ken
2002-06-06 9:10 ` Linker error when compiling with GNU C/C++ compilers (SPARC) 3.0.4 bjorn rohde jensen
0 siblings, 1 reply; 2+ messages in thread
From: Harley Ken @ 2002-06-06 9:06 UTC (permalink / raw)
To: 'gcc-help@gcc.gnu.org'
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>
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Linker error when compiling with GNU C/C++ compilers (SPARC) 3.0.4
2002-06-06 9:06 Linker error when compiling with GNU C/C++ compilers (SPARC) 3.0. 4 Harley Ken
@ 2002-06-06 9:10 ` bjorn rohde jensen
0 siblings, 0 replies; 2+ messages in thread
From: bjorn rohde jensen @ 2002-06-06 9:10 UTC (permalink / raw)
To: Harley Ken; +Cc: 'gcc-help@gcc.gnu.org'
Hi Harley,
Why not just have gcc create the shared object using the
-shared option? It knows all about the platform specific
link magic to create shared objects;)
Yours sincerely,
Bjorn
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-06-06 16:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-06-06 9:06 Linker error when compiling with GNU C/C++ compilers (SPARC) 3.0. 4 Harley Ken
2002-06-06 9:10 ` Linker error when compiling with GNU C/C++ compilers (SPARC) 3.0.4 bjorn rohde jensen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).