- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
I'm just getting started with MKL, and I'm having some trouble running the examples in the user guide. I'm using Visual C++ 2005 (express), and have followed the directions in the guide regarding the Configuration of my Development envirornment. I am have installed MKL 9.1.027. Any help would be very much welcome.
Thanks,
TheFell
#include
#include
"mkl.h"typedef
struct{ double re; double im; } complex16;extern
"C" void zdotc (complex16*, int *, complex16 *, int *, complex16*,
int *);#define
N 5void
main(){
int
n, inca = 1, incb = 1, i;complex16 a
n = N;
for
( i = 0; i < n; i++ ){a.re = (
double)i; a.im = (double)i * 2.0;b.re = (
double)(n - i); b.im = (double)i * 2.0;}
zdotc(&c, &n, a, &inca, b, &incb );
printf(
"The complex dot product is: ( %6.2f, %6.2f) ", c.re, c.im );}
1>Compiling...
1>main.cpp
1>.main.cpp(5) : error C2733: second C linkage of overloaded function 'zdotc' not allowed
1> .main.cpp(4) : see declaration of 'zdotc'
1>Build log was saved at DebugBuildLog.htm"
1>CPokerProject - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Suggest to use the MKL_Complex16 type defined in MKL header files,
and omit declaration of zdotc() which is already provided by "mkl.h".
So, you had to change the sample code to get it to compile. Welcome to real world.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page