Showing results for 
Search instead for 
Did you mean: 

[SOLVED] Compilation error

Hello again...,
so I just wanted to compile my first program that uses IMKL.
I chose one example from the userguide, it's in

And here is the code:

#define MKL_Complex16 std::complex
#include"/opt/intel/composerxe/mkl/include/mkl.h" //adjusted to my needs
#define N 5

int main()
        int n; int inca = 1, incb = 1, i;
        std::complex a, b, c;
        n = N;
        for( i = 0; i < n; i++ ){
                a = std::complex(i,i*2.0);
                b = std::complex(n-i,i*2.0);
        zdotc(&c, &n, a, &inca, b, &incb );
        std::cout << "The complex dot product is: " << c << std::endl;
        return 0;

I used the Parameters from the Link Advisor Website for compiling / Linking ( ) and tried:

[bash]g++ -Wall -DMKL_ILP64  -m64 -c main.cpp[/bash]

Unfortunately this leads to the following error:

[plain]main.cpp:26:42: error: cannot convert int* to const long long int* for argument 2 to void zdotc(std::complex*, const long long int*, const std::complex*, const long long int*, const std::complex*, const long long int*)[/plain]

Any ideas why this is happening?

//Edit: This problem is also solved... maybe I shouldn't just make a guess about the compiler options... withhout the "-DMKL_ILP64" it works fine.
0 Kudos
0 Replies