user3199900
user3199900

Reputation: 141

Linking MKL library in C++

I'm having a lot of trouble linking the Intel MKL libraries to my code in C++. I downloaded the MKL library from this link: https://software.intel.com/content/www/us/en/develop/tools/math-kernel-library/choose-download/windows.html

Then it says to use MKL Link Line Advisor to obtain the proper compiler options, which I'm having a lot of trouble figuring out. For reference, I'm using Windows, g++ 8.1.0 and MinGW-W64. Here is part by part:

The above choices give me the following compiler options

 /4I8 /module:"%MKLROOT%"\include\intel64/ilp64 -I"%MKLROOT%"\include

And this results in error from the compiler:

/4I8: No such file or directory

Can somebody help me please?

Upvotes: 1

Views: 4151

Answers (1)

stackoverblown
stackoverblown

Reputation: 802

I think you should use -DMKL_ILP64 -I"%MKLROOT%"\include for g++. You should definitely not pick Intel(R) Fortran for the compiler since you are not compiling Fortran programs.

Upvotes: 0

Related Questions