[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[photran] Re: How to build a Windows DLL from a fortran code with
|
I've been trying to work on that myself. So far what I have come up with is to
create a makefile project. Instead of calling the gfortran to compile to an
executable I use the following lines to make an archive
gfortran -funderscoring -I$(IDIR) -O0 -g -Wall -c -fmessage-length=0 -o"$@" "$<"
ar -ru -s libfGeneralTools.a $(OBJS)
Note that the first line is just copied from the the automatically generated
makefiles. I haven't had a chance yet to play with dlltool, but I'm sure a little
constructive searching on the internet will yield the correct commands to replace
the call to ar.
Keith Prussing
Message: 1
Date: Thu, 29 Apr 2010 11:52:07 +0200
From: DEVEL Michel <Michel.Devel@xxxxxxxx>
Subject: [photran] How to build a Windows DLL from a fortran code with
photran/gfortran ?
To: Photran Information <photran@xxxxxxxxxxx>
Message-ID: <4BD956C7.9050100@xxxxxxxx>
Content-Type: text/plain; charset="iso-8859-1"
Dear photran users and developers,
I recently got a 72 ko fortran code full of subroutines that is usually
transformed into a Windows DLL by Lahey Fortran 90 (using DLL_EXPORT
lines in the code)
Could anyone tell me how I could do the same with photran ?
(I already tried using a "shared library type" project, with MinGW GCC
tool chain and could get foo.o (once the DLL_EXPORT were commented
out...), but the later command
gfortran -o foo.dll foo.o
does complain about "undefined reference to `MAIN__' which is normal
since there is no main program.
Under Linux I would think I would have had a ranlib or ar line instead
of this gfortran line...
It is the first time I try to build a Windows DLL so that I do not know
the specific flags/steps to build a dll.
--
Sincerely yours,
Michel DEVEL
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://dev.eclipse.org/mailman/private/photran/attachments/20100429/ba6e69d8/attachment.html
------------------------------
_______________________________________________
photran mailing list
photran@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/photran
End of photran Digest, Vol 56, Issue 8
**************************************