libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fortran DLLs on mingw32


From: Ralf Wildenhues
Subject: Re: Fortran DLLs on mingw32
Date: Thu, 8 Jan 2009 19:25:03 +0100
User-agent: Mutt/1.5.17+20080114 (2008-01-14)

Hello Steve,

* Steve Edwards wrote on Thu, Jan 08, 2009 at 05:51:27PM CET:
> This is just a request to find out if anyone out there has tried using
> libtool to build Fortran DLLs under mingw32?

First question I'd ask: which gfortran version, and can it (or a newer
available version) build a shared libgfortran?  That should avoid the
problems you're having, I hope.

Looking at the FSF GCC tree, it doesn't seem like they're building
shared libgfortran shared on w32 yet (but I don't know whether
MinGW/MSYS has modified GCC in this regard).  Guess it's worth asking
about this (on either, not both) upstream.  A fix could be as easy as
adding -no-undefined to libgfortran/Makefile.am and AC_LIBTOOL_WIN32_DLL
to libgfortran/configure.ac.

> The problem was when a Fortran program in the library package
> tries to link against the created DLL (it was actually a test case
> wrapper)
> 
> It fails with a number of multiple definition errors:
> 
> __gfortran_set_options
> __gfortran_transfer_character
> __gfortran_st_write_done
> __gfortran_st_write
> 
> 
> It appears that the DLL creation has pulled in symbols from the
> libgfortran compiler runtime?
> 
> Am I correct in assuming that this is due to the gfortran runtime not
> being available in DLL form?

Probably.  A quick workaround would appear to be to use either one of
'-export-symbols FILE' or '-export-symbols-regex REGEX' with an argument
suitable of listing only the symbols from your library.  Untested.

Hope that helps.

Cheers,
Ralf




reply via email to

[Prev in Thread] Current Thread [Next in Thread]