gfortran can't find library that IS there

后端 未结 1 1422
生来不讨喜
生来不讨喜 2021-01-05 22:00

I\'m having trouble linking my program to a library. I\'ve never done this before so I\'m probably doing something stupid, but as far as I can tell I\'m doing the right thin

相关标签:
1条回答
  • 2021-01-05 22:23

    Try -lbar (or perhaps -lhealpix, if that's the real library name).

    -lxyz results in a search for a file named libxyz.a. Consequently, if you specify -llibbar.a then the file needs to be named liblibbar.a.a.

    You could also simply specify the path and full name of the archive file on the gfortran command line: gfortran -o foo foo.f90 /directory/of/library/libbar.a

    0 讨论(0)
提交回复
热议问题