2

I have a library file created in gfortran, how to link it to a host program that uses its procedures using preprocessor (without using the GUI method) For exemple in Intel Visual fortran this is done by:

!DEC$ Objcomment lib: 'library.lib' 
ChrisMM
  • 8,448
  • 13
  • 29
  • 48
Syntax_ErrorX00
  • 213
  • 3
  • 7

1 Answers1

1

As mentioned here, there is no such directive in GCC that allow you linking static libraries. Instead, use the command line:

gfortran filename.f90 -o filename -L[path] -l[lib]

s.ouchene
  • 1,682
  • 13
  • 31