- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am new in Blas and Lapack and have probably a very simple question. I installed the MKL library 10 and tried to run the example from the User Guide for C++ but I got the error:
g++ -o tmp testblas2.cc -L$MKLPATH -I$MKLINCLUDE -lmkl
testblas2.cc:4: error: declaration of C function `void zdotc(complex16*, int*, complex16*, int*, complex16*, int*)' conflicts with
/opt/intel/mkl/10.0/include/mkl_blas.h:297: error: previous declaration `void zdotc(MKL_Complex16*, int*, MKL_Complex16*, int*, MKL_Complex16*, int*)' here
testblas2.cc:9: error: `main' must return `int'
testblas2.cc: In function `int main(...)':
what is wrong?
Jojo
I am new in Blas and Lapack and have probably a very simple question. I installed the MKL library 10 and tried to run the example from the User Guide for C++ but I got the error:
g++ -o tmp testblas2.cc -L$MKLPATH -I$MKLINCLUDE -lmkl
testblas2.cc:4: error: declaration of C function `void zdotc(complex16*, int*, complex16*, int*, complex16*, int*)' conflicts with
/opt/intel/mkl/10.0/include/mkl_blas.h:297: error: previous declaration `void zdotc(MKL_Complex16*, int*, MKL_Complex16*, int*, MKL_Complex16*, int*)' here
testblas2.cc:9: error: `main' must return `int'
testblas2.cc: In function `int main(...)':
what is wrong?
Jojo
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You may have a more recent version of g++ than what testblas2 was written for, or the example may not be updated for consistency with MKL 10. It's better to rely entirely on the header file, and remove the conflicting declaration from the example source.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry, its not clear to me what to do?
May icc work for this example?
May icc work for this example?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
icc may not be as strict in comparing syntax as the latest g++ is, so it may work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Forall bloody beginners (like me)having the same problem:
#include "mkl_typse.h"
MKL_Complex16* a
compile with:
g++ -o tmp testblas.cc -L$MKLPATH -I$MKLINCLUDE -lmkl -lguide -lpthread
then its fine...

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page