From: Dan Nagle Subject: Re: Help on how to create a library with F90 Date: 1999/09/06 Message-ID: <37D3EDD9.5072B3E1@erols.com>#1/1 X-Deja-AN: 521735681 Content-Transfer-Encoding: 7bit References: <37D3E8A6.CF0DA937@hydra.cfm.brown.edu> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@rcn.com X-Trace: rEKZyuqkDdksLtyG0FiEr8yPqbLEJShcuXCyjXmgEIo= Organization: Purple Sage Computing Solutions, Inc. Mime-Version: 1.0 Reply-To: dna...@erols.com NNTP-Posting-Date: 6 Sep 1999 16:39:56 GMT Newsgroups: comp.lang.fortran Hello, Regrettably, this is processor dependent, meaning that the standard does not specify the file names for module symbol files. Some vendors use .mod, others .M, others some variation of .o or .obj. Also, regrettably, there is nothing in the standard which requires that a module produce a library when compiled. Many compilers produce a .o or .obj file when compiling a module. Thus, one may or may not get a selective load when using a module, i.e., one may have many unused items in the executable. For more specific advice, please state your compiler/os. Wai Sun Don wrote: > > I am attempting to create a mathematical library using Fortran 90. > However, I ran into the following difficult that I hope someone can > give me > some pointer. > > I have the following module that was archived into the library, say > libjunk.a > > Module Junk_Library > USE A > USE B > END Module Junk_Library > > A and B are two modules containing all the subroutines of the > library. > > In the main program, I would USE the Module Junk_Library in order > to > access the subroutines contained in modules A and B > > For example, > > Program Main > USE Junk_Library > > ..... > > END Program > > > To create the executable, I compile the program Main and link it with > the library libjunk.a > (without the lib and a, of course.) However, the F90 compiler would > complaint that > it is unable to access the module symbol file for the module > Junk_Library, namely > Junk_Library.mod > which was deleted after the creation of the library libjunk.a > > So, in the sense, if I wish to distribute the library, I would have to > also distribute the module symbol > file Junk_Library.mod ? Is there anyway to get around this > problem? If so, How? > > Thanks for the info. > > -- > ..................................................................... > Prof. Wai Sun Don, PhD > > Box F, 182 George Street > Div. of Applied Math. Tel : (401)-863-2250 > Brown University Fax : (401)-863-1355 > Providence, RI 02912 > > -- Cheers! Dan Nagle dna...@erols.com Purple Sage Computing Solutions, Inc.