[SOLVED] Compilation error

[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[N], b[N], c;
        n = N;
        for( i = 0; i < n; i++ ){
                a[i] = std::complex(i,i*2.0);
                b[i] = 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 (http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/ ) and tried:

g++ -Wall -DMKL_ILP64  -m64 -c main.cpp

Unfortunately this leads to the following error:

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*)

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.

1 post / 0 new
For more complete information about compiler optimizations, see our Optimization Notice.