Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
7220 Discussions

trouble compiling simplest code : undefined reference to `vslNewStream'

Dan_Connors
Beginner
896 Views

Here's the code (intel.sandbox.cpp):

#include "mkl_vsl.h"

int main() {
VSLStreamStatePtr stream_state;
vslNewStream( &stream_state, VSL_BRNG_R250, 1232);
}


What is the simplest way to compile this if I am using:

g++ -I/opt/intel/mkl/10.2.2.025/include intel.sandbox.cpp -L/opt/intel/mkl/10.2.2.025/lib/32/

I realize that I did not include any -lmkl_* I have tried at least 40 variations. There is no global -lmkl in my library.
0 Kudos
1 Reply
Gennady_F_Intel
Moderator
896 Views
Quoting - Dan Connors

Here's the code (intel.sandbox.cpp):

#include "mkl_vsl.h"

int main() {
VSLStreamStatePtr stream_state;
vslNewStream( &stream_state, VSL_BRNG_R250, 1232);
}


What is the simplest way to compile this if I am using:

g++ -I/opt/intel/mkl/10.2.2.025/include intel.sandbox.cpp -L/opt/intel/mkl/10.2.2.025/lib/32/

I realize that I did not include any -lmkl_* I have tried at least 40 variations. There is no global -lmkl in my library.

Please see the article how to link the mkl libraries
0 Kudos
Reply