public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* problem using gcc to compile and ld to link on Sun Solaris 9
@ 2005-10-05 15:17 Ceka
  2005-10-05 20:03 ` Installing gcc,g++ for windows xp cino hilliard
  0 siblings, 1 reply; 2+ messages in thread
From: Ceka @ 2005-10-05 15:17 UTC (permalink / raw)
  To: gcc-help

Hi
i have some troubles using gcc to compile et ld to link on Sun Solaris 9.

I use to compile and link with gcc and everything was fine:
COMP= gcc -ansi -Wall -ansi -pedantic -g –c <my .cpp's>
LINK = gcc -G  $(LINKER_OPTIONS) -o libnativesgw.so <my.o's>

But now i need to use Purify on that, and Purify does not support the
GNU linker, so i have to use the ld (the Solaris linker) instead of
gcc (which  invoke collect2) to link the shared library.
I was also told to use the -fPIC options to produce position
independent code for a shared lib.
Here is how i compile and link now:
COMP= gcc -fPIC -ansi -Wall -ansi -pedantic -g –c <my .cpp's>
LINK = ld -G  $(LINKER_OPTIONS) -o libnativesgw.so <my.o's>

But when i try to run the prog that hits the library, it just crashes
and give me a "core dumped"

So my question is: Have you ever encounter that? Do you know about any
gcc (or ld) options that could make them happy?

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-10-05 20:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-05 15:17 problem using gcc to compile and ld to link on Sun Solaris 9 Ceka
2005-10-05 20:03 ` Installing gcc,g++ for windows xp cino hilliard

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).