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

* RE: Installing gcc,g++ for windows xp
  2005-10-05 15:17 problem using gcc to compile and ld to link on Sun Solaris 9 Ceka
@ 2005-10-05 20:03 ` cino hilliard
  0 siblings, 0 replies; 2+ messages in thread
From: cino hilliard @ 2005-10-05 20:03 UTC (permalink / raw)
  To: gcc-help

Hi,
Several months ago I was able to download and install gcc,g++ and cygwin and 
use the c++
compiler for various c programs. This was working fine for a long time.

Then trying to solve another problem with Pari I blew the gcc compiler. 
Trying to fix this I ended up
deleting what I had figuring that I could download it again. Here is what I 
had in folder gcc.

Somehow I am unable to find where to download this from again. Several 
sources point to
cygwin and mingw.

Well
After hours and hours of searching I solved it.

To install gcc-g++ binaries on a windows xp can be a makor chore if you try 
to find out how by
browsing the net. By luck after many hours of searching, I stumbled on the 
mingw 5.0 executable

http://prdownloads.sourceforge.net/mingw/MinGW-5.0.0.exe?download

Download this installer.

This allows quick installation on your system and you don't have to fiddle 
with the environment
variables.

It is mind boggling why this is not in a topic or in the FAQ of the many gcc 
pages out there.

I suggest that someone post this in the pages with the link with key words 
installing gcc,g++,for
windows etc. This will save bandwidth considerably as I downloaded many many 
files before I
stumbled on the answer.

If Ii missed it and it IS out there, please forgive me.

Cino


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