Re: For cpex08, the compile and link failed

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Wed, 15 Feb 2006 08:49:55 -0700 (MST)

Try adding "-lgcc" to the end of your compile line:

pgf90 -O -o cpex08 cpexcc.f cpex08.f -L/usr/local/ncarg/lib
-L/usr/X11R6/lib -lncarg -lncarg_gks -lncarg_c -lX11 -lXext -lgcc

If it can't find the gcc library, you may need to "help" it with
something like:

pgf90 -O -o cpex08 cpexcc.f cpex08.f -L/usr/local/ncarg/lib
-L/usr/X11R6/lib -lncarg -lncarg_gks -lncarg_c -lX11 -lXext
-L/usr/lib/gcc/i386-redhat-linux/4.0.0 -lgcc

The "/usr/lib/gcc-i386-redhat-linux/4.0.0" should be replaced with
whatever directory "libgcc8" resides in.

--Mary

On Tue, 14 Feb 2006 nwaldyd_at_upb.edu.co wrote:

> Hi...
>
> I use gcc and pgf90 to compile NCARG, when testing the installation the
> following appears:
>
> [waldyd_at_localhost ~]$ ncargex cpex08
>
> NCAR Graphics Fortran Example <cpex08>
>
> Copying cpex08.f
>
> Copying cpexcc.f
>
> Compiling and linking...
> pgf90 -O -o cpex08 cpexcc.f cpex08.f -L/usr/local/ncarg/lib
> -L/usr/X11R6/lib -lncarg -lncarg_gks -lncarg_c -lX11 -lXext
> cpexcc.f:
> cpex08.f:
> /usr/bin/ld: /crtbegin.o: No such file: No such file or directory
>
> The compile and link failed.
>
> Then, i tried to search the file crtbegin.o and the followin appears:
>
> [waldyd_at_localhost ~]$ find / -name crtbegin.o
> /usr/lib/gcc/i386-redhat-linux/4.0.0/crtbegin.o
> /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/crtbegin.o
> /usr/lib/gcc-lib/i386-redhat-linux/2.96/crtbegin.o
> ...
>
>
> What can i do to solve this?
> Can i make NCARG using pgf77? If yes, how do i configure the installation
> ($NCARG_ROOT/configure/LINUX file)?
>
> Beforehand Thanks...
>
> PD: I must use a PG compiler due to compatibility issues
>
> _______________________________________________
> ncarg-talk mailing list
> ncarg-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncarg-talk
>
_______________________________________________
ncarg-talk mailing list
ncarg-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncarg-talk
Received on Wed Feb 15 2006 - 08:49:55 MST

This archive was generated by hypermail 2.2.0 : Wed Feb 15 2006 - 20:53:06 MST