public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Problem with libg2c
@ 2006-07-12  5:12 Athichart Tangpong
  2006-07-13  1:24 ` Tim Prince
  0 siblings, 1 reply; 4+ messages in thread
From: Athichart Tangpong @ 2006-07-12  5:12 UTC (permalink / raw)
  To: gcc-help; +Cc: tangpong

Dear Sir,

I have a problem with libg2c on a newly-installed Fedora Core 5 system. 
When I compile programs that require libg2c, I have got this error.

/usr/bin/ld: cannot find -lg2c
collect2: ld returned 1 exit status
error: command 'c++' failed with exit status 1

However, when I check, I have found that it exists on the file system.

/usr/lib/gcc-lib/i386-redhat-linux/3.2.3/libg2c.so
/usr/lib/gcc-lib/i386-redhat-linux/3.2.3/libg2c.a
/usr/lib/libg2c.so.0.0.0
/usr/lib/libg2c.so.0

Does anyone know how to fix this problem? Thank you in advance for your 
help.

Athichart

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

* Re: Problem with libg2c
  2006-07-12  5:12 Problem with libg2c Athichart Tangpong
@ 2006-07-13  1:24 ` Tim Prince
  2006-07-22 10:03   ` Rupert Wood
  0 siblings, 1 reply; 4+ messages in thread
From: Tim Prince @ 2006-07-13  1:24 UTC (permalink / raw)
  To: Athichart Tangpong; +Cc: gcc-help

Athichart Tangpong wrote:
> Dear Sir,
> 
> I have a problem with libg2c on a newly-installed Fedora Core 5 system. 
> When I compile programs that require libg2c, I have got this error.
> 
> /usr/bin/ld: cannot find -lg2c
> collect2: ld returned 1 exit status
> error: command 'c++' failed with exit status 1
> 
> However, when I check, I have found that it exists on the file system.
> 
> /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/libg2c.so
> /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/libg2c.a
> /usr/lib/libg2c.so.0.0.0
> /usr/lib/libg2c.so.0
> 
> Does anyone know how to fix this problem? Thank you in advance for your 
> help.
> 
I'm sure someone has attempted to post a reply, as I've done myself.  I 
guess you didn't try obvious possibilities, like replacing -lg2c with 
the entire path of the library you desire, as you didn't say what errors 
came about.  If you cared, evidently g++ -print-search-dirs would show 
you which directories are searched for libraries.

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

* RE: Problem with libg2c
  2006-07-13  1:24 ` Tim Prince
@ 2006-07-22 10:03   ` Rupert Wood
  0 siblings, 0 replies; 4+ messages in thread
From: Rupert Wood @ 2006-07-22 10:03 UTC (permalink / raw)
  To: 'Athichart Tangpong'; +Cc: tprince, gcc-help

> Athichart Tangpong wrote:
>
> > Dear Sir,
> > 
> > I have a problem with libg2c on a newly-installed Fedora Core 5 
> > system.  When I compile programs that require libg2c, I have got
> > this error.

It's also possible you no longer need libg2c: it (IIRC) is for g77 the old
Fortran implementation that has been replaced by gfortran. (That said you
may need to link something else instead for gfortran but I don't know enough
about it.)

The one you found on disk:

> > /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/libg2c.so
> > /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/libg2c.a

is for the old compatibility compiler: Fedora Core 5's system compiler is
gcc 4.1 not 3.2.3. Or you could try building your program with that compiler
instead.

Rup.


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

* Re: Problem with libg2c
@ 2006-07-21 20:00 Timothy C Prince
  0 siblings, 0 replies; 4+ messages in thread
From: Timothy C Prince @ 2006-07-21 20:00 UTC (permalink / raw)
  To: tangpong; +Cc: gcc-help, tangpong



-----Original Message-----
From: Athichart Tangpong <tangpong@cse.psu.edu>
To: gcc-help@gcc.gnu.org
Date: Wed, 12 Jul 2006 01:12:16 -0400
Subject: Problem with libg2c

Dear Sir,

I have a problem with libg2c on a newly-installed Fedora Core 5 system. 
When I compile programs that require libg2c, I have got this error.

/usr/bin/ld: cannot find -lg2c
collect2: ld returned 1 exit status
error: command 'c++' failed with exit status 1

However, when I check, I have found that it exists on the file system.

/usr/lib/gcc-lib/i386-redhat-linux/3.2.3/libg2c.so
/usr/lib/gcc-lib/i386-redhat-linux/3.2.3/libg2c.a
/usr/lib/libg2c.so.0.0.0
/usr/lib/libg2c.so.0

Does anyone know how to fix this problem? Thank you in advance for your 
help.
_____________________________________________________
You could try a symlink from those libraries into some place on the library search path of the compiler you are using
(for g++, try g++ -print-search-dirs), copy it to your current directory, or specify the full path of the library you want.
Tim Prince

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

end of thread, other threads:[~2006-07-22 10:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-12  5:12 Problem with libg2c Athichart Tangpong
2006-07-13  1:24 ` Tim Prince
2006-07-22 10:03   ` Rupert Wood
2006-07-21 20:00 Timothy C Prince

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