Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

g95 - how to build a DLL
How do you build DLLs with g95 ?

Report this thread to moderator Post Follow-up to this message
Old Post
Gustav Ivanovic
11-26-04 01:56 AM


Re: g95 - how to build a DLL
On 25 Nov 2004, Gustav Ivanovic wrote:

> How do you build DLLs with g95 ?
>

DLLs are build by running the microsoft linker with special options.
It may be able to link object files generated by g95 into an object file.
I don't know if it will or not.

Andy



Report this thread to moderator Post Follow-up to this message
Old Post
Andy Vaught
11-26-04 09:09 PM


Re: g95 - how to build a DLL
gustav_ivanovic@yahoo.com (Gustav Ivanovic) wrote in message news:<c4855309.0411251239.1322
9afe@posting.google.com>...
> How do you build DLLs with g95 ?

Here's a procedure that worked for me using Cygwin and gfortran
instead of g95. In order to create a DLL callable from Visual Basic or
VBA (Word, Excel) it is necessary to create a MinGW dll but using
Cygwin tools. Apparently calls to the Cygwin dlls cause the program to
hang.

install gfortran in /home/irun.... then from a bash shell prompt:

gfortran -o foo.dll -s -shared -mrtd -mno-cygwin foo.f95

-o sets the output file to foo.dll
-s strips debug information
-shared creates a dll
-mrtd sets the calling convention to stdcall
-mno-cygwin builds a MinGW type executable

note that the subroutine name is decorated to foo_.

in order to get this to complete, you need to:

1. move f951.exe up the directory tree to /home/irun/bin
2. move missing .a files & missing .o files from /lib/mingw to
/home/irun/lib
3. move the right libgcc.a into /home/irun/lib

foo.f95 is:

subroutine foo(i)
integer i
i=i+1
return
end

see some of my previous posts on creating dlls for VB with g77 for
details on suitable Word documents as test programs.

This probably would work with g95 instead of gfortran if you can
install it properly and put the needed MinGW components in the proper
places. (Sorry, I gave up after installing g95 and getting it to
create Cygwin based executables.)

Report this thread to moderator Post Follow-up to this message
Old Post
E P Chandler
11-26-04 09:09 PM


Re: g95 - how to build a DLL
"Gustav Ivanovic"  wrote

>How do you build DLLs with g95 ?

See also:
http://sources.redhat.com/ml/cygwin...1/msg00106.html



Report this thread to moderator Post Follow-up to this message
Old Post
Charles Russell
11-27-04 02:10 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Fortran archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 06:58 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.