Author Topic: Fortran DLL Library  (Read 2519 times)

JMAERO13

  • Guest
Fortran DLL Library
« on: February 05, 2019, 10:08:41 am »
Hi all,

I am trying to include an external library (I have both .dll and .lib files) into my program. Both (program and library) are written in Fortran.

I use GNU Fortran compiler in CodeBlocks 16.01. How do I include the library and call the functions/subroutines which are inside it? I am not an expert in software developing, so I don't understand which is the function of the different options of the GUI.

If possible, I would need a guide step by step  :'(

Thank you!

Offline gd_on

  • Lives here!
  • ****
  • Posts: 797
Re: Fortran DLL Library
« Reply #1 on: February 05, 2019, 05:23:46 pm »
1) A search in Google with those keywords "call dll from fortran" may help you.
2) .lib files are generally not for gnu fortran. They are essentially static libraries for microsoft compilers and may be for some other compilers. I'm not sure they are always usable with gnu compilers.
Windows 11 64 bits (23H2), svn C::B (last version or almost!), wxWidgets 3.2.4 (tests with 3.3), Msys2 Compilers 13.2.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\msys64\mingw64) or 32 bits (dwarf2, posix  in C:\msys64\mingw32).