Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
6433 Discussions

LNK2019 to Symbol _DftiFreeDescriptor and others

Marian_L_
Beginner
126 Views

Hello all,

I'm evaluating the MKL11 and tried the example "basic_dp_real_dft_1d.c".

I'm getting the linker error messages:

1>basic_dp_real_dft_1d.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_DftiFreeDescriptor" in Funktion "_main".
1>basic_dp_real_dft_1d.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_DftiComputeBackward" in Funktion "_main".
1>basic_dp_real_dft_1d.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_DftiComputeForward" in Funktion "_main".
1>basic_dp_real_dft_1d.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_DftiCommitDescriptor" in Funktion "_main".
1>basic_dp_real_dft_1d.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_DftiSetValue" in Funktion "_main".
1>basic_dp_real_dft_1d.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_DftiCreateDescriptor_d_1d" in Funktion "_main".
1>basic_dp_real_dft_1d.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_DftiGetValue" in Funktion "_main".

Did I forget to link something?

BTW: I needed to adjust the include for mkl_dftk.h, the compiler did not find the header file:

//#include "mkl_dfti.h"
#include "C:\Program Files (x86)\Intel\Composer XE 2013\mkl\include\mkl_dfti.h"

Thank you for the help,

Marian

0 Kudos
5 Replies
Sridevi_A_Intel
Employee
126 Views

Hello Marian,

I quickly ran the above example you mentioned in windows (using MSVS). i didnt see any problems. I'm attaching the solution file. If you need Linux make file, let me know I'll send you linkline in a makefile. meanwhile, did you try our link line Advisor?http://software.intel.com/sites/products/mkl/

Please try that and let me know if you still have problems. 

Gennady_F_Intel
Moderator
126 Views

to be shortly - this is the linking problem - pls look at the mkl linker adviser from here http://software.intel.com/sites/products/mkl/. you can find there the list of libraries required for linking .

Marian_L_
Beginner
126 Views

Thank you for your answers. I needed to add the linker line and the compiler line in the project's settings:

Now, another error appears:

fatal error LNK1104: Cannot open file"mkl_intel_c_dll.lib"

Which seems ok, since it is located here:

c:\Program Files (x86)\Intel\Composer XE 2013\mkl\lib\ia32\mkl_intel_c_dll.lib

whereas %MKLROOT%/include points to

c:\Program Files (x86)\Intel\Composer XE 2013\mkl\include\


Just adding another -I term does not solve the problem. What did I miss?

@Sridevi: Thanks for the solution file - I'm using VS2008, which cannot cope with vcxproj unfortunately.

Marian_L_
Beginner
126 Views

Thank you for your responses. @Sridevi: Thanks for your solution file, but I'm using VS2008, which is unable to open vcxproj files.

I added the link line (mkl_intel_c_dll.lib mkl_sequential_dll.lib  mkl_core_dll.lib)  and compiler line ( -I%MKLROOT%/include), but I'm getting another linking error: LINK : fatal error LNK1104: Datei "mkl_intel_c_dll.lib" kann nicht geöffnet werden. (Cannot open file)

The mkl_intel_c_dll.lib is also not located in %MKLROOT%/include (C:\Program Files (x86)\Intel\Composer XE 2013\mkl\include) but in C:\Program Files (x86)\Intel\Composer XE 2013\mkl\lib\ia32\. Is that ok?

Marian_L_
Beginner
126 Views

Sorry for the duplicates.

It turned out that I used the wrong entry lines for compiler and Linker lines. I tried to apply these tips:

http://software.intel.com/en-us/articles/how-to-build-mkl-application-in-intel-visual-fotran-msvc200...

at least for the paths.

Then the project built and I just have to copy the redist DLLs to the projects output directory.

Thanks.

Reply