Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!cs.dal.ca!silvert From: silvert@cs.dal.ca (Bill Silvert) Newsgroups: comp.lang.fortran Subject: Re: Microsoft Fortran Question - linking Summary: your linker script is wrong Message-ID: <1990May6.135021.7117@cs.dal.ca> Date: 6 May 90 13:50:21 GMT References: <1432@ns-mx.uiowa.edu> Sender: silvert@cs.dal.ca.UUCP (Bill Silvert) Reply-To: bill@biomel.UUCP Distribution: na Organization: Habitat Ecology Div., Bedford Inst. of Oceanography Lines: 40 In article <1432@ns-mx.uiowa.edu> jlhaferman@l_eld09.icaen.uiowa.edu (Jeffrey Lawrence Haferman) writes: >I just got a copy of Microsoft Fortran 2.2 and have lost >my patience trying to link some external subroutines. > >The main program "J2.ftn" compiled fine, and it calls subroutines >"SUB1" and "SUB2" which are located in file "SUBS.ftn" >which also compiled fine once I turned on the "R" (subprogram >compile) option. > >The fortran compiler produced a file "J2 APL" and "SUBS.sub". >I went into the linker and said "f J2" followed by "o SUBS" Error ................ this should be "f SUBS". You have told the linker to link only J2.apl and to create the executable application called J2. The documentation states quite clearly that the files to be linked are read in with the "f" command (the main application comes first). The "o" command is like the "-o" option with Unix compilers, it specifies the name of the output file if it is different from the default (which is the name of the first file read in with the "f" command). >then "g", and it complains of unresolved references to >"SUB1" and "SUB2" even though they should be found. Only if you tell the linker to find them. >So, how am I suppossed to be linking this stuff? Also, >Microsoft has done a horrible job with this product in >my opinion - I'm using it since the it is the only >Macintosh Fortran the University has. It is an obsolete product. MS has dropped it and it is now sold by the developer, Absoft. The current version is 2.4 I believe. -- William Silvert, Habitat Ecology Division, Bedford Inst. of Oceanography P. O. Box 1006, Dartmouth, Nova Scotia, CANADA B2Y 4A2. Tel. (902)426-1577 UUCP=..!{uunet|watmath}!dalcs!biomel!bill BITNET=bill%biomel%dalcs@dalac InterNet=bill%biomel@cs.dal.ca