Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!apple!agate!shelby!portia.stanford.edu!elaine1.stanford.edu!alad From: alad@elaine1.stanford.edu (Aladdin Nassar) Newsgroups: comp.lang.fortran Subject: Fortran library system calls for UNIX Message-ID: <1990Dec16.205427.24851@portia.Stanford.EDU> Date: 16 Dec 90 20:54:27 GMT Sender: alad@portia.stanford.edu Followup-To: alad@portia.stanford.edu Organization: Stanford University - AIR Lines: 39 I am trying to use the fortran library function 'system' to execute a UNIX command from within a fortan program on the SUN SPARC workstations. (check man 3f system). The test program is as follows : c--------------test.f---------------------------- program test integer system i=system('/bin/ls') stop end c------------------------------------------------ I compile and link as follows : f77 -o test test.f -lU77 and I get the error message : ld: Undefined symbol _units I tried the same code and procedure on a DEC 5400 and it worked fine with no error message. What could be the problem ? Could _units be defined in other archives libraries ? Would using the 'nm' command help solve this problem ? Please respond by e-mail to alad@portia.stanford.edu (I don't follow USENET constantly) and I will summarize if there are any responses. Thanks, Aladdin Nassar Gradute Student Civil Engineering, Stanford Univeristy