From: earnie_boyd AT yahoo DOT com (Earnie Boyd) Subject: Re: Mingw32, g77 and B20 10 Nov 1998 01:56:12 -0800 Message-ID: <19981109123906.7314.rocketmail.cygnus.gnu-win32@send1e.yahoomail.com> Reply-To: earnie_boyd AT yahoo DOT com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii To: Guido Masarotto , gnu-win32 AT cygnus DOT com ---Guido Masarotto wrote: > > I have recently ported a statistical program (R = "Gnu S") using > egcs-mingw32 (http://www.ci.tuwien.ac.at/R/contents.html). > > R require both C and Fortran. Today, I tried to recompile it > using B20 + the g77 add-on made available by Mumit Khan. > I used the mingw32 flag (-mno-cygwin) after adjusting `specs' > (as discussed by many messages in these days). > Compilation was ok but linking gave a lot of unresolved symbols. > The problem is that the Fortran library in the Mumit's add-on > (libg2c) is for Cygwin not for Mingw32. > Next, I linked not against the B20 libg2c but against the > egcs-1.1-mingw32 libg2c (theory: it is the same version of egcs, > the libraries must be the same, this last one is built for > Mingw32). Linking was okay and R seems to work ok > (also some dll's (mixing Fortran and C) dyn.loaded by R at runtime). > > Question is: is this reliable? Or, what must be done to use > Fortran with Mingw32 and B20? > If the library was built using the cygwin headers then it will require the use of the cygwin libraries. If the library was built using the mingw32 headers then it will require the use of the crtdll libraries. Which library to use is controlled via the specs file based on the -mno-cygwin switch. Now if you want libraries of the same name to use with the different headers you'll have to decide if you want to name the libraries differently, (i.e.: libg2c-cygwin and libg2c-mingw32) or if you want to create a directory named mingw32 in the lib/ directory and figure out how to change the specs file to use the appropriate directory based on the -mno-cygwin switch. Both methods have pro's and con's but you have to decide which is best for you. As for reliability, I believe that they are equal in reliability. The real question is, do you want to be forced to make your source code OpenSource under the GNU copyright? And, are you porting UNIX code or are you just creating your own? If you're porting UNIX then it might be best to use cygwin. If you're writing fresh code or if you want proprietary source code then it is probably best to use mingw32. == - \\||// -------------o0O0--Earnie--0O0o-------------- -- earnie_boyd AT yahoo DOT com -- -- http://www.freeyellow.com/members5/gw32 -- ----------------ooo0O--O0ooo----------------- PS: Newbie's, you should visit my page. _________________________________________________________ DO YOU YAHOO!? Get your free @yahoo.com address at http://mail.yahoo.com - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".