Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

about ifort

yingwu
Beginner
1,456 Views
Hi, after resetting my password, I am back again.

I am learning to use command line to compile the code. So I use ifort. In my code, I need to use MKL and another library, named MATFOR. I got the problem when I specify the include path and the library path in the ifort command.

My command is

C:\>ifort test.f90 mkl.lib libguide.lib -I C:\Program Files\AnCAD\MATFOR4\include\IF9 -link C:\Program Files\AnCAD\MATFOR4\lib\IF9


However, there is error returning as below:

Intel Visual Fortran Compiler Professional for applications running on IA-32, Version 11.0 Build 20081105 Package ID: w_cprof_p_11.0.066

Copyright (C) 1985-2008 Intel Corporation. All rights reserved.

ifort: command line warning #10161: unrecognized source type 'Files\AnCAD\MATFOR4\include\IF9'; object file assumed

test.f90(6): error #7002: Error in opening the compiled module file. Check INCLUDE paths. [FML]
use fml
----^
test.f90(7): error #7002: Error in opening the compiled module file. Check INCLUDE paths. [FGL]
use fgl
----^
test.f90(144): error #6404: This name does not have a type, and must have an explicit type. [MF]
call msdisplay(mf(m1),'m1')
---------------^
compilation aborted for test.f90 (code 1)


So how to add the include path? Thanks very much
0 Kudos
1 Reply
TimP
Honored Contributor III
1,456 Views
Look up the ifort command line option I in the help file. It's just like every other compiler I've seen the last 20 years.
USE files would have the suffix .mod appended, so they have to be compiled (from Fortran MODULE source code) prior to their appearance in USE.
INCLUDE files must be Fortran source, in format compatible with the source file where INCLUDE appears.
0 Kudos
Reply