This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [Fwd: Linking Problems with gcc-3.3]
- From: Paul Brook <paul at codesourcery dot com>
- To: Wolfgang Köhler <wolfk at gfz-potsdam dot de>,fortran at gcc dot gnu dot org
- Date: Thu, 22 Jan 2004 10:35:51 +0000
- Subject: Re: [Fwd: Linking Problems with gcc-3.3]
- Organization: CodeSourcery
- References: <400F9E45.6EAF4263@gfz-potsdam.de>
On Thursday 22 January 2004 9:56 am, Wolfgang Köhler wrote:
> Hello,
>
> I have recently tried to update my gcc from version 2.95 -> 3.3
> and was not able to compile an older program that links
> Fortan with C-code. Compiling succeeds but linking fails with
> errors:
>
> undefined reference to:
> __gxx_personality_v0
>
> and some other undefines associated with C new-operator.
>
> Can you help me?
Sounds like you actualy mean C++. __gxx_personality_v0 is in libsupc++, which
might not have existed/been part of libstdc++ in gcc 2.9.5.
Basically you need to link in both the c++ and fortran runtime libraries.
Probably the easiest way to do this to link the final executable with g++ and
add -lgfortran to link the fortran runtime.
Paul