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

compiling with cygwin tools

Anwar_Ludin
Beginner
1,205 Views
Hello,



I am having a hard time trying to compile mkl applications with the cygwin tools. Has anyone tried that before?



Here is a small test program I am trying to compile:



#include "mkl.h"

#include



int main(){

int numElements = 10;

float input[numElements] ,output[numElements];

int i;

for(i=0;i

input = i+1;

}

vsSqrt(numElements, input, output);

for(i=0;i

printf("output: %f", output);



}

return 0;



}





I am using the following command line:



gcc -IC:/Intel/MKL/8.0/include -LC:/Intel/MKL/8.0/ia32/lib src/testVectorSqrt.c -lmkl_ia32 -lmkl_c -lmkl_s_dll



I get the following errors (havent shown the entire trace):



Warning: .drectve `-defaultlib:mkl_ia32.lib ' unrecognized

Warning: .drectve `-defaultlib:mkl_ia32.lib ' unrecognized

Warning: .drectve `-defaultlib:uuid.lib ' unrecognized

Warning: .drectve `-defaultlib:uuid.lib ' unrecognized

Warning: .drectve `-defaultlib:mkl_ia32.lib ' unrecognized

Warning: .drectve `-defaultlib:mkl_ia32.lib ' unrecognized

Warning: .drectve `-defaultlib:uuid.lib ' unrecognized

Warning: .drectve `-defaultlib:uuid.lib ' unrecognized

Warning: .drectve `-defaultlib:mkl_ia32.lib ' unrecognized

Warning: .drectve `-defaultlib:mkl_ia32.lib ' unrecognized

C:/Intel/MKL/8.0/ia32/lib/mkl_c.lib(./_tmp/interface_ia32_c/vml_ssqrt.obj):d:/800/09/vml/_src:(.text[_vsSqrt]+0x84): undefined reference to `_mkl_vml_core_w7_vml_sSqrt_HA'

C:/Intel/MKL/8.0/ia32/lib/mkl_c.lib(./_tmp/interface_ia32_c/vml_ssqrt.obj):d:/800/09/vml/_src:(.text[_vsSqrt]+0x8e): undefined reference to `_mkl_vml_core_w7_vml_sSqrt_21'

C:/Intel/MKL/8.0/ia32/lib/mkl_c.lib(./_tmp/interface_ia32_c/vml_ssqrt.obj):d:/800/09/vml/_src:(.text[_vsSqrt]+0x9f): undefined reference to `_mkl_vml_core_t7_vml_sSqrt_HA'

C:/Intel/MKL/8.0/ia32/lib/mkl_c.lib(./_tmp/interface_ia32_c/vml_ssqrt.obj):d:/800/09/vml/_src:(.text[_vsSqrt]+0xa9): undefined reference to `_mkl_vml_core_t7_vml_sSqrt_21'





Any help would be greatly appreciated!



Regards,

Anwar
0 Kudos
1 Reply
TimP
Honored Contributor III
1,205 Views
You'll need to read cygwin documentation for hints, if you're serious about about dynamic linking. http://www.cygwin.com/cygwin-ug-net/dll.html
I suspect the Microsoft style export .lib won't work with cygwin tools.
mkl_s_dll is built for the CVF modified stdcall interface. Are you sure you want to use that?
If you try static linking, of course, the cygwin tools expect the library to be named .a, and expect it to contain .o files. You could likely arrange a copy of the static library with the name changes.
You might also use cygwin gcc along with the Microsoft linker (e.g. from C++ 2003 toolkit), for static linking. That should avoid any renaming.
0 Kudos
Reply