Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: JMAERO13 on February 05, 2019, 10:08:41 am

Title: Fortran DLL Library
Post by: JMAERO13 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!
Title: Re: Fortran DLL Library
Post by: gd_on 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.