Author Topic: Fortran DLL Library  (Read 354 times)

Offline JMAERO13

  • Single posting newcomer
  • *
  • Posts: 1
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

  • Regular
  • ***
  • Posts: 467
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 10 or 7, svn C::B (last version or almost!), WxWidgets 3.1.2, Compilers 8.1.0, 32 bits (sjlj, posix : gcc and gfortran installed in C:\MinGW32) or 64 bits by Compilers 8.1.0 (seh, posix : in C:\MinGW64).