This email was buried in the wrong email folder
after my MAC crashed... sorry for the delay.
This email is not clear to me. Can you please provide a simple example?
--- Some general background on fortran In f77 there is the concept of COMMON blocks where one or more variables are shared among (most commonly) the main code and subroutines. In f90, there is the idea of a MODULE. The information in the MODULE can be accessed by a progran unit via the USE statment. MODULEs must(?) be compiled separately prior to USE of various program units. When compiled together [some fortran compiler] foo_module.f90 main.f90 sub1.f ...... the compiler/loader establishes the required links. In NCL, when you use WRAPIT on individul program units WRAPIT foo_1.f WRAPIT foo_2.f I am not sure if the required linkages are present. -- I know that if you want to link to the LAPACK library which is distributed with NCL (a little know fact)you must include that library on the WRAPIT command line. EG: Access the LAPACK subroutine 'DGELS'. The following is a f77 code (dgels_interface.f C NCLFORTSTART SUBROUTINE DGELSI( M, N, NRHS, A, B, LWORK, WORK ) IMPLICIT NONE INTEGER M, N, NRHS, LWORK DOUBLE PRECISION A( M, N ), B( M, NRHS), WORK(LWORK) C NCLEND C declare local variables INTEGER INFO CHARACTER*1 TRANS TRANS = "N” CALL DGELS(TRANS, M,N,NRHS,A,LDA,B,LDB,WORK,LWORK,INFO) RETURN END WRAPIT –L $NCARG_ROOT/lib -l lapack_ncl dgels_interface.f --- Maybe someone else can contribute further. On 02/13/2013 11:01 AM, Paul Scorer wrote: > Hello all, > > Is it the case that if a variable is defined in one .so file in NCL_DEF_LIB_DIR > (so that "nm file1.so" shows, say "02c5c6c D ncl_var_name") > it cannot be referenced from another .so file > (i.e. "nm file2.so shows "U ncl_var_name")? > > > This certainly seems to be the case, as I get > "file2.so: undefined symbol: ncl_var_name" > on running the ncl code! > > Maybe someone could confirm this - and suggest a workaround! > > Thanks > > PaulS > > > _______________________________________________ > ncl-talk mailing list > List instructions, subscriber options, unsubscribe: > http://mailman.ucar.edu/mailman/listinfo/ncl-talk > _______________________________________________ ncl-talk mailing list List instructions, subscriber options, unsubscribe: http://mailman.ucar.edu/mailman/listinfo/ncl-talkReceived on Fri Feb 22 10:06:18 2013
This archive was generated by hypermail 2.1.8 : Fri Feb 22 2013 - 17:42:16 MST