Re: use a c dll in fortran?
- From: "N. Shamsundar" <shamsundar_at_@xxxxxx>
- Date: Thu, 30 Mar 2006 09:23:53 -0600
tripplowe@xxxxxxxxx wrote:
Hey Folks,You may benefit by thinking about DLLs not a C DLLs or Fortran DLLs but DLLs with certain linkage conventions (Optlink, Stdcall, cDecl, etc.).
Is it possible to use a dll created in C in my Fortran programs (Lahey
Fortran 95). If so, could you point me towards some documentation on
how it can be done? Google searches return a lot of "use fortran dll
in c" or "fortran dll in vb", but I can not seem to find "use c dll in
fortran".
Thanks Much.
R. Lowe
Many compilers, C as well as Fortran, accept switches as well as modifiers in the code, directing them to produce code following these linkage conventions. You then see if compiler X can output code using the linkage Y that your DLL Z was built with.
If not, you try to obtain the source code for DLL Z and recompile the DLL using a linkage convention common to the two or more compilers that you use.
If this also fails, you consider writing wrapper code or assembler glue code.
N. Shamsundar
University of Houston
.
- References:
- use a c dll in fortran?
- From: tripplowe
- use a c dll in fortran?
- Prev by Date: Re: Making fortran libraries
- Next by Date: Re: .mod generation question
- Previous by thread: use a c dll in fortran?
- Next by thread: Making fortran libraries
- Index(es):
Relevant Pages
|
|