fortran/ada/c code linking issues

Ishwar Rattan ishwar@pali.cps.cmich.edu
Wed Sep 28 17:55:00 GMT 2005



On Wed, 28 Sep 2005, Brett Grant wrote:

> done, but some of this stuff is a complete mystery to
> me.  Anyway, I have a program that is written in
> fortran.  It has some subroutines written in C and in
> Ada.  When I compile the program on the Suns, I must
> include the flag '-static' in order to get it to
> compile and link correctly.  However, on the opterons
> and macs, if I include the flag '-static', it will
> compile, but not link.  It says that it can't find
> some gnat library:
>
> /usr/bin/ld: cannot find -lgnat-3.4
> collect2: ld returned 1 exit status
> gnatlink: cannot call /usr/bin/gcc
>

Maybe you have non-shared object on Solaris for gnatlibrary  and not
on other systems. Static flag implies that .a version of
library exists for linking.

-ishwar



More information about the Gcc-help mailing list