Author Topic: Fortran DLL Library  (Read 200 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: 443
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 2.8.12, Compilers TDM 4.9.2 32 bits (gcc and gfortran installed in C:\MinGW32). Tests with C::B 64 bits and WxWidgets 2.8.12 or 3.1.2 (64 bits) compiled by TDM 4.9.2 or Std 8.1 in C:\MinGW64