/usr/bin/ld: cannot find

Hi,

I’m trying to compile an in-house program with a library compiled just before this. Previously I compiled WRF and MM5 in my Linux machine, but this is the first time, I’m getting this error.

Can anybody please throw some light on this? Any help is appreciated.

Thanks

Surya

$ pgf90 APDRCPPToolSubs_v1.f90 -L /home/mark/Download/Surface_Modeling/PGI/APDRCPPTool/ -l libJEEAIFORT.a
PGF90-W-0093-Type conversion of expression performed (APDRCPPToolSubs_v1.f90: 435)
PGF90-W-0093-Type conversion of expression performed (APDRCPPToolSubs_v1.f90: 435)
PGF90-W-0093-Type conversion of expression performed (APDRCPPToolSubs_v1.f90: 435)
0 inform, 3 warnings, 0 severes, 0 fatal for apdrcpptool
/usr/bin/ld: cannot find -llibJEEAIFORT.a

$ pgf90 APDRCPPToolSubs_v1.f90 -L /home/mark/Download/Surface_Modeling/PGI/APDRCPPTool/ -l libJEEAIFORT.a

try to remove “-l”:

 pgf90 APDRCPPToolSubs_v1.f90 libJEEAIFORT.a -L /home/mark/Download/Surface_Modeling/PGI/APDRCPPTool/

Hi Surya,

The “-l” (lower case L) will include a library on the link line but will add a “lib” prefix and “.a” suffix on Linux. So either add the library directly to the link as tlstar suggests or use “-lJEEAIFORT”. The difference is that if you use “libJEEAIFORT.a” the linker will only look for the library in the current directory. Using “-lJEEAIFORT”, the linker will look for the library in the default locations and directories specified with the “-L” flag.

Hope this helps,
Mat