Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
公告
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

MacOS X Catalina ifort linking issue

facdisa
初学者
978 次查看

Hi,

my problem is that the linker fails with:
ld: library not found for -llibfparser.a

when I use:

ifort -L/usr/local/lib/ -I/usr/local/include/fparser-v1.1/ -llibfparser.a test.f90

if I compile specifying the complete path all is OK

ifort -I/usr/local/include/fparser-v1.1/ /usr/local/lib/libfparser.a test.f90

this gives me the correct executable file.

There are two modules that are correctly seen through the -I switch what seems to not work is the -L switch.

Thanks

(sorry for my English)

0 项奖励
1 解答
mecej4
名誉分销商 III
962 次查看

According to Unix conventions, the command should be

 

ifort -I/usr/local/include/fparser-v1.1/ test.f90 -L/usr/local/lib -lfparser

 

在原帖中查看解决方案

0 项奖励
1 回复
mecej4
名誉分销商 III
963 次查看

According to Unix conventions, the command should be

 

ifort -I/usr/local/include/fparser-v1.1/ test.f90 -L/usr/local/lib -lfparser

 

0 项奖励
回复