Hello all,
With the help of Mary Haley and Dennis Shea
(thanks again) a solution has been found to
the creating shared object
files with Portland Group compilers problem.
Instead of liniking the object files with the
"ld" command, you should use the pgf90 command
with the -shared command line option enabled.
(Section 8.3 of the Online Docs at www.pgroup.com)
This commands pgf90 to create a shared object
and links in a library that would other wise would not
be linked in. Below, please find the
final script for compiling f90 code and it's
accompanying f77 stub file.
Thanks,
Jan
---------------------------------------
#! /bin/csh -fx
# comp_f90.sh
# a script to compile (for both fortran and C)
# the code necessary to create an NCL executable
# shared object using the Portland Group Compilers
# The scirpt sould be fed the xxx of xxx.f
# i.e. "comp_f90.sh xxx" creates xxx.so
set name = $1
set file_f90 = $name'.f90'
set file_f77 = $name'_stub.f'
wrapit77 <$file_f77>! $name'_W.c'
# note libraries are required for fortan IO
pgcc -I/usr/local/ncarg/include/ -c $name'_W.c'
pgf90 -I/usr/local/ncarg/include -c $file_f90 -lfortran
# Note: when using the Portland Group Compiliers
# you have to use pgf90 -shared instead of the Linux "ld" command
pgf90 -shared -o $name'.so' $name'_W.o' $name'.o' \
-L/usr/pgi/linux86/lib -lpgf90
This archive was generated by hypermail 2b29 : Fri Mar 09 2001 - 07:11:19 MST