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

Linking MKL with Eclipse IDE CDT C/C++

elmeliegy__abdelrahm
945 Views

 I am trying to link Intel Math Kernel Library (MKL) with C/C++ through Eclipse IDE. Actually i followed the steps provided by Intel website but still the problem. I am trying to compile one example of those coming with the MKL package.  The console shows me this "error in BOLD" ;

17:34:17 **** Incremental Build of configuration Debug for project complex2 ****
Info: Internal Builder is used for build
gcc "-IC:\\Program Files (x86)\\IntelSWTools\\compilers_and_libraries_2018.1.156\\windows\\mkl\\include" "-IC:\\Program Files (x86)\\IntelSWTools\\compilers_and_libraries_2018.1.156\\windows\\mkl\\include\\fftw" -O0 -g3 -Wall -c -fmessage-length=0 -o complex2.o "..\\complex2.c" 
gcc "-LC:\\Program Files (x86)\\IntelSWTools\\compilers_and_libraries_2018.1.156\\windows\\mkl\\lib\\intel64_win" -o complex2.exe complex2.o -lmkl_blas95_ilp64 -lmkl_blas95_lp64 -lmkl_core -lmkl_core_dll -lmkl_intel_ilp64 -lmkl_intel_ilp64_dll -lmkl_intel_lp64 -lmkl_intel_lp64_dll -lmkl_intel_thread -lmkl_intel_thread_dll -lmkl_lapack95_ilp64 -lmkl_lapack95_lp64 -lmkl_rt -lmkl_sequential -lmkl_sequential_dll -lmkl_tbb_thread -lmkl_tbb_thread_dll 
complex2.o: In function `main':
C:\Users\aaelmeli\workspace\complex2\Debug/../complex2.c:93: undefined reference to `init_input_and_expected_vectors_c'
C:\Users\aaelmeli\workspace\complex2\Debug/../complex2.c:99: undefined reference to `fftw_create_plan'
C:\Users\aaelmeli\workspace\complex2\Debug/../complex2.c:100: undefined reference to `die_unless'
C:\Users\aaelmeli\workspace\complex2\Debug/../complex2.c:105: undefined reference to `fftw_one'
C:\Users\aaelmeli\workspace\complex2\Debug/../complex2.c:120: undefined reference to `fftw_create_plan'
C:\Users\aaelmeli\workspace\complex2\Debug/../complex2.c:121: undefined reference to `die_unless'
C:\Users\aaelmeli\workspace\complex2\Debug/../complex2.c:126: undefined reference to `fftw_one'
C:\Users\aaelmeli\workspace\complex2\Debug/../complex2.c:136: undefined reference to `scaling'
C:\Users\aaelmeli\workspace\complex2\Debug/../complex2.c:144: undefined reference to `check_result_c'
collect2.exe: error: ld returned 1 exit status
17:34:27 Build Finished (took 10s.41ms)

 

0 Kudos
9 Replies
mecej4
Honored Contributor III
945 Views

To use the FFTW interface, you need to compile and link with the FFTW wrapper, which is provided as source code, as described at https://software.intel.com/en-us/mkl-developer-reference-c-appendix-d-fftw-interface-to-intel-math-kernel-library .

Your linking line shows indiscriminate use of all the MKL libraries. For instance, the *95 libraries have no relevance to using MKL from C code. The *ilp64* and *lp64 libraries are incompatible and you should use only the appropriate ones for your code. See https://software.intel.com/en-us/articles/intel-mkl-link-line-advisor .

 

 

0 Kudos
elmeliegy__abdelrahm
945 Views

I am sorry mecej4, How can I compile and link with FFTW wrappers. As I see, there are many files.c which are not containing the Main function.

Also, how can I identify which library I should use.

I am sorry for that but really I am confused. I am using Eclipse IDE CDT for C/C++ with GCC compiler.

Thanks in advance.  

0 Kudos
Gennady_F_Intel
Moderator
945 Views

MKL packages contain the makefiles which may help you to build standalone libraries of FFTW[3/2] [C/F] wrappers to MKL. see MKLROOT/interfaces folders. 

Regards to your original questions -- the set of libs you used for linking contains everything but this is not what mkl linker adviser recommends to do. Please check with MKL LA or see MKL User's Guide the examples how build/link your application. 

 

0 Kudos
elmeliegy__abdelrahm
945 Views

Hi

I am trying now with VS 2017, the OS is windows 10. I am trying to build the lib for fftw2x but i could not. 

i opened the command window , i changed the direcctory to the wrapper directory where makefile exists. then : nmake libintel64 compiler=msvc install_dir=desktop.

but it gives me that error 

"

The directory or file cannot be created.
NMAKE : fatal error U1077: 'if' : return code '0x1'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\bin\HostX64\x64\nmake.EXE"' : return code '0x2'
Stop"
Please, can you help me with that. i have been trying more than a week.
Thanks in advance
0 Kudos
mecej4
Honored Contributor III
945 Views

If you are not the system administrator or have administrator privileges on your computer, you will have to copy the FFTW source package (including makefiles, etc.) to a working directory on a device/directory on your machine to which you have full access and build the library there. After building the library, if you want it added to the MKL directory tree, you may need to ask your system administrator to do so.

0 Kudos
Ying_H_Intel
Employee
945 Views
 
Hello, 
Mecej4 is right, please copy the whole fftw2c folder to one writable folder,  then the nmake will work.  the processing is like
1. copy fftw2c to your desktop , which support can be wrote.  In command line, you may first run
2.  Open MSVS 2017 command line windows from start-up -> All programs -> Visual Stuido 2017-> Visual Studio tools-> developer command prompt for VS 2017 :  cd the folder
3. in command line wondows, run the command  to set MKL environment :
"C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2018.1.156\windows\mkl\bin\mklvars.bat" intel64
​4. nmake libintel64 compiler=msvs (not msvc)  install_dir=desktop

​Hope it helps
 
 
Best Regards,
Ying
 
By the way,  the MKL library for window should be work with intel compiler and MSVS compiler , don't support GNU GCC + mkl library for windows. So you may not to use MKL in Eclipse with GNU GCC.

​Here is the command output in my MSVS prompt windows
**********************************************************************
** Visual Studio 2017 Developer Command Prompt v15.0.26228.10
** Copyright (c) 2017 Microsoft Corporation
**********************************************************************
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional>cd C:\Program F
iles (x86)\IntelSWTools\compilers_and_libraries_2018.1.156\windows\mkl\interface
s\fftw2xc
C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2018.1.156\windows\m
kl\interfaces\fftw2xc>nmake libintel64 compiler=msvc install_dir=desktop
Microsoft (R) Program Maintenance Utility Version 14.10.25017.0
Copyright (C) Microsoft Corporation.  All rights reserved.
        nmake PLAT=win32e lib ARCH=intel64  compiler=msvc PRECISION=MKL_DOUBLE
Microsoft (R) Program Maintenance Utility Version 14.10.25017.0
Copyright (C) Microsoft Corporation.  All rights reserved.
        if not exist "desktop\obj_double_msvc" md "desktop\obj_double_msvc"
The directory or file cannot be created.
NMAKE : fatal error U1077: 'if' : return code '0x1'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017
\Professional\VC\Tools\MSVC\14.10.25017\bin\HostX86\x86\nmake.EXE"' : return cod
e '0x2'
Stop.
 
 
 
C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2018.1.156\windows\m
kl\interfaces\fftw2xc>cd ..
C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2018.1.156\windows\m
kl\interfaces>cd C:\Users\yhu5\Desktop\mkl example\fftw2xc\fftw2xc
C:\Users\yhu5\Desktop\mkl example\fftw2xc\fftw2xc>nmake libintel64 compiler=msvc
 install_dir=desktop
Microsoft (R) Program Maintenance Utility Version 14.10.25017.0
Copyright (C) Microsoft Corporation.  All rights reserved.
        nmake PLAT=win32e lib ARCH=intel64  compiler=msvc PRECISION=MKL_DOUBLE
Microsoft (R) Program Maintenance Utility Version 14.10.25017.0
Copyright (C) Microsoft Corporation.  All rights reserved.
        if not exist "desktop\obj_double_msvc" md "desktop\obj_double_msvc"
        nmake fftw.obj  fftw_check_memory_leaks.obj  fftw_create_plan.obj  fftw_
create_plan_specific.obj  fftw_destroy_plan.obj  fftw_die.obj  fftw_export_wisdo
m.obj  fftw_export_wisdom_to_file.obj  fftw_export_wisdom_to_string.obj  fftw_fo
rget_wisdom.obj  fftw_fprint_plan.obj  fftw_free.obj  fftw_import_wisdom.obj  ff
tw_import_wisdom_from_file.obj  fftw_import_wisdom_from_string.obj  fftw_malloc.
obj  fftw_one.obj  fftw_print_max_memory_usage.obj  fftw_print_plan.obj  fftw_si
zeof_fftw_real.obj  fftw_threads.obj  fftw_threads_init.obj  fftw_threads_one.ob
j  fftw2d_create_plan.obj  fftw2d_create_plan_specific.obj  fftw3d_create_plan.o
bj  fftw3d_create_plan_specific.obj  fftwnd.obj  fftwnd_create_plan.obj  fftwnd_
create_plan_specific.obj  fftwnd_destroy_plan.obj  fftwnd_fprint_plan.obj  fftwn
d_one.obj  fftwnd_print_plan.obj  fftwnd_threads.obj  fftwnd_threads_one.obj  rf
ftw.obj  rfftw_create_plan.obj  rfftw_create_plan_specific.obj  rfftw_destroy_pl
an.obj  rfftw_executor_simple.obj  rfftw_fprint_plan.obj  rfftw_one.obj  rfftw_p
rint_plan.obj  rfftw_threads.obj  rfftw_threads_one.obj  rfftw2d_create_plan.obj
  rfftw2d_create_plan_specific.obj  rfftw3d_create_plan.obj  rfftw3d_create_plan
_specific.obj  rfftwnd_complex_to_real.obj  rfftwnd_create_plan.obj  rfftwnd_cre
ate_plan_specific.obj  rfftwnd_destroy_plan.obj  rfftwnd_fprint_plan.obj  rfftwn
d_one_complex_to_real.obj  rfftwnd_one_real_to_complex.obj  rfftwnd_print_plan.o
bj  rfftwnd_real_to_complex.obj  rfftwnd_threads_complex_to_real.obj  rfftwnd_th
reads_one_complex_to_real.obj  rfftwnd_threads_one_real_to_complex.obj  rfftwnd_
threads_real_to_complex.obj library  compiler=msvc PRECISION=MKL_DOUBLE
Microsoft (R) Program Maintenance Utility Version 14.10.25017.0
Copyright (C) Microsoft Corporation.  All rights reserved.
        set include=..\..\include;..\..\include\fftw;%include%
        icl   /c /MT /DMKL_DOUBLE /Fo"desktop\obj_double_msvc"\ wrappers\fftw.c
'icl' is not recognized as an internal or external command,
operable program or batch file.
NMAKE : fatal error U1077: 'icl' : return code '0x1'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017
\Professional\VC\Tools\MSVC\14.10.25017\bin\HostX86\x86\nmake.EXE"' : return cod
e '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017
\Professional\VC\Tools\MSVC\14.10.25017\bin\HostX86\x86\nmake.EXE"' : return cod
e '0x2'
Stop.
C:\Users\yhu5\Desktop\mkl example\fftw2xc\fftw2xc>nmake libintel64 compiler=msvs
 install_dir=desktop
Microsoft (R) Program Maintenance Utility Version 14.10.25017.0
Copyright (C) Microsoft Corporation.  All rights reserved.
        nmake PLAT=win32e lib ARCH=intel64  compiler=msvs PRECISION=MKL_DOUBLE
Microsoft (R) Program Maintenance Utility Version 14.10.25017.0
Copyright (C) Microsoft Corporation.  All rights reserved.
        if not exist "desktop\obj_double_msvs" md "desktop\obj_double_msvs"
        nmake fftw.obj  fftw_check_memory_leaks.obj  fftw_create_plan.obj  fftw_
create_plan_specific.obj  fftw_destroy_plan.obj  fftw_die.obj  fftw_export_wisdo
m.obj  fftw_export_wisdom_to_file.obj  fftw_export_wisdom_to_string.obj  fftw_fo
rget_wisdom.obj  fftw_fprint_plan.obj  fftw_free.obj  fftw_import_wisdom.obj  ff
tw_import_wisdom_from_file.obj  fftw_import_wisdom_from_string.obj  fftw_malloc.
obj  fftw_one.obj  fftw_print_max_memory_usage.obj  fftw_print_plan.obj  fftw_si
zeof_fftw_real.obj  fftw_threads.obj  fftw_threads_init.obj  fftw_threads_one.ob
j  fftw2d_create_plan.obj  fftw2d_create_plan_specific.obj  fftw3d_create_plan.o
bj  fftw3d_create_plan_specific.obj  fftwnd.obj  fftwnd_create_plan.obj  fftwnd_
create_plan_specific.obj  fftwnd_destroy_plan.obj  fftwnd_fprint_plan.obj  fftwn
d_one.obj  fftwnd_print_plan.obj  fftwnd_threads.obj  fftwnd_threads_one.obj  rf
ftw.obj  rfftw_create_plan.obj  rfftw_create_plan_specific.obj  rfftw_destroy_pl
an.obj  rfftw_executor_simple.obj  rfftw_fprint_plan.obj  rfftw_one.obj  rfftw_p
rint_plan.obj  rfftw_threads.obj  rfftw_threads_one.obj  rfftw2d_create_plan.obj
  rfftw2d_create_plan_specific.obj  rfftw3d_create_plan.obj  rfftw3d_create_plan
_specific.obj  rfftwnd_complex_to_real.obj  rfftwnd_create_plan.obj  rfftwnd_cre
ate_plan_specific.obj  rfftwnd_destroy_plan.obj  rfftwnd_fprint_plan.obj  rfftwn
d_one_complex_to_real.obj  rfftwnd_one_real_to_complex.obj  rfftwnd_print_plan.o
bj  rfftwnd_real_to_complex.obj  rfftwnd_threads_complex_to_real.obj  rfftwnd_th
reads_one_complex_to_real.obj  rfftwnd_threads_one_real_to_complex.obj  rfftwnd_
threads_real_to_complex.obj library  compiler=msvs PRECISION=MKL_DOUBLE
Microsoft (R) Program Maintenance Utility Version 14.10.25017.0
Copyright (C) Microsoft Corporation.  All rights reserved.
        set include=..\..\include;..\..\include\fftw;%include%
        cl   /c /MT /DMKL_DOUBLE /Fo"desktop\obj_double_msvs"\ wrappers\fftw.c
Microsoft (R) C/C++ Optimizing Compiler Version 19.10.25017 for x86
Copyright (C) Microsoft Corporation.  All rights reserved.
fftw.c
c:\users\yhu5\desktop\mkl example\fftw2xc\fftw2xc\wrappers\fftw2_mkl.h(34): fata
l error C1083: Cannot open include file: 'mkl_dfti.h': No such file or directory
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017
\Professional\VC\Tools\MSVC\14.10.25017\bin\HostX86\x86\cl.EXE"' : return code '
0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017
\Professional\VC\Tools\MSVC\14.10.25017\bin\HostX86\x86\nmake.EXE"' : return cod
e '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017
\Professional\VC\Tools\MSVC\14.10.25017\bin\HostX86\x86\nmake.EXE"' : return cod
e '0x2'
Stop.
C:\Users\yhu5\Desktop\mkl example\fftw2xc\fftw2xc>cd C:\Program Files (x86)\Inte
lSWTools\compilers_and_libraries_2018.1.156\windows\mkl\interfaces\fftw2xc
C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2018.1.156\windows\m
kl\interfaces\fftw2xc>nmake libintel64 compiler=msvs install_dir=desktop
Microsoft (R) Program Maintenance Utility Version 14.10.25017.0
Copyright (C) Microsoft Corporation.  All rights reserved.
        nmake PLAT=win32e lib ARCH=intel64  compiler=msvs PRECISION=MKL_DOUBLE
Microsoft (R) Program Maintenance Utility Version 14.10.25017.0
Copyright (C) Microsoft Corporation.  All rights reserved.
        if not exist "desktop\obj_double_msvs" md "desktop\obj_double_msvs"
The directory or file cannot be created.
NMAKE : fatal error U1077: 'if' : return code '0x1'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017
\Professional\VC\Tools\MSVC\14.10.25017\bin\HostX86\x86\nmake.EXE"' : return cod
e '0x2'
Stop.
C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2018.1.156\windows\m
kl\interfaces\fftw2xc>"C:\Program Files (x86)\IntelSWTools\compilers_and_librari
es_2018.1.156\windows\mkl\bin\mklvars.bat" intel64

 

0 Kudos
elmeliegy__abdelrahm
945 Views

It generated folder named obj_double_msvs but this folder is empty.

this is my command displays:

 

C:\Users\aaelmeli\Desktop\fftw2xc>nmake libintel64 compiler=msvs install_dir=desktop
 
Microsoft (R) Program Maintenance Utility Version 14.12.25831.0
Copyright (C) Microsoft Corporation.  All rights reserved.
 
        nmake PLAT=win32e lib ARCH=intel64  compiler=msvs PRECISION=MKL_DOUBLE
 
Microsoft (R) Program Maintenance Utility Version 14.12.25831.0
Copyright (C) Microsoft Corporation.  All rights reserved.
 
        if not exist "desktop\obj_double_msvs" md "desktop\obj_double_msvs"
        nmake fftw.obj  fftw_check_memory_leaks.obj  fftw_create_plan.obj  fftw_create_plan_specific.obj  fftw_destroy_plan.obj  fftw_die.obj  fftw_export_wisdom.obj  fftw_export_wisdom_to_file.obj  fftw_export_wisdom_to_string.obj  fftw_forget_wisdom.obj  fftw_fprint_plan.obj  fftw_free.obj  fftw_import_wisdom.obj  fftw_import_wisdom_from_file.obj  fftw_import_wisdom_from_string.obj  fftw_malloc.obj  fftw_one.obj  fftw_print_max_memory_usage.obj  fftw_print_plan.obj  fftw_sizeof_fftw_real.obj  fftw_threads.obj  fftw_threads_init.obj  fftw_threads_one.obj  fftw2d_create_plan.obj  fftw2d_create_plan_specific.obj  fftw3d_create_plan.obj  fftw3d_create_plan_specific.obj  fftwnd.obj  fftwnd_create_plan.obj  fftwnd_create_plan_specific.obj  fftwnd_destroy_plan.obj  fftwnd_fprint_plan.obj  fftwnd_one.obj  fftwnd_print_plan.obj  fftwnd_threads.obj  fftwnd_threads_one.obj  rfftw.obj  rfftw_create_plan.obj  rfftw_create_plan_specific.obj  rfftw_destroy_plan.obj  rfftw_executor_simple.obj  rfftw_fprint_plan.obj  rfftw_one.obj  rfftw_print_plan.obj  rfftw_threads.obj  rfftw_threads_one.obj  rfftw2d_create_plan.obj  rfftw2d_create_plan_specific.obj  rfftw3d_create_plan.obj  rfftw3d_create_plan_specific.obj  rfftwnd_complex_to_real.obj  rfftwnd_create_plan.obj  rfftwnd_create_plan_specific.obj  rfftwnd_destroy_plan.obj  rfftwnd_fprint_plan.obj  rfftwnd_one_complex_to_real.obj  rfftwnd_one_real_to_complex.obj  rfftwnd_print_plan.obj  rfftwnd_real_to_complex.obj  rfftwnd_threads_complex_to_real.obj  rfftwnd_threads_one_complex_to_real.obj  rfftwnd_threads_one_real_to_complex.obj  rfftwnd_threads_real_to_complex.obj library  compiler=msvs PRECISION=MKL_DOUBLE
 
Microsoft (R) Program Maintenance Utility Version 14.12.25831.0
Copyright (C) Microsoft Corporation.  All rights reserved.
 
        set include=..\..\include;..\..\include\fftw;%include%
        cl   /c /MT /DMKL_DOUBLE /Fo"desktop\obj_double_msvs"\ wrappers\fftw.c
Microsoft (R) C/C++ Optimizing Compiler Version 19.12.25831 for x86
Copyright (C) Microsoft Corporation.  All rights reserved.
 
fftw.c
c:\users\aaelmeli\desktop\fftw2xc\wrappers\fftw2_mkl.h(34): fatal error C1083: Cannot open include file: 'mkl_dfti.h': No such file or directory
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\bin\HostX86\x86\cl.EXE"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\bin\HostX86\x86\nmake.EXE"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\bin\HostX86\x86\nmake.EXE"' : return code '0x2'
Stop.
 
C:\Users\aaelmeli\Desktop\fftw2xc>cd C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2018.1.156\windows\mkl\interfaces\fftw2xc
 
C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2018.1.156\windows\mkl\interfaces\fftw2xc>nmake libintel64 compiler=msvs install_dir=desktop
 
Microsoft (R) Program Maintenance Utility Version 14.12.25831.0
Copyright (C) Microsoft Corporation.  All rights reserved.
 
        nmake PLAT=win32e lib ARCH=intel64  compiler=msvs PRECISION=MKL_DOUBLE
 
Microsoft (R) Program Maintenance Utility Version 14.12.25831.0
Copyright (C) Microsoft Corporation.  All rights reserved.
 
        if not exist "desktop\obj_double_msvs" md "desktop\obj_double_msvs"
The directory or file cannot be created.
NMAKE : fatal error U1077: 'if' : return code '0x1'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\bin\HostX86\x86\nmake.EXE"' : return code '0x2'
Stop.
0 Kudos
elmeliegy__abdelrahm
945 Views

I managed to generate this library "fftw2xc_double_msvs.lib" for example fftw2xc. However, while linking process, it gives me error. 

I am using VS 2017 C/C++. I included the name of this file in Additional Dependencies in the Linker menu. Also, i provided the path of this file. 

The displayed message as shown. 

 

Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol WinMain referenced in function "int __cdecl __scrt_common_main_seh(void)" (?__scrt_common_main_seh@@YAHXZ) FFTW2Xtrial2 c:\Users\aaelmeli\source\repos\FFTW2Xtrial2\MSVCRT.lib(exe_winmain.obj) 1
Error LNK2019 unresolved external symbol init_input_and_expected_vectors_c referenced in function main FFTW2Xtrial2 c:\Users\aaelmeli\source\repos\FFTW2Xtrial2\FFTW2x.obj 1
Error LNK2019 unresolved external symbol scaling referenced in function main FFTW2Xtrial2 c:\Users\aaelmeli\source\repos\FFTW2Xtrial2\FFTW2x.obj 1
Error LNK2019 unresolved external symbol fftw_one referenced in function main FFTW2Xtrial2 c:\Users\aaelmeli\source\repos\FFTW2Xtrial2\FFTW2x.obj 1
Error LNK2019 unresolved external symbol fftw_create_plan referenced in function main FFTW2Xtrial2 c:\Users\aaelmeli\source\repos\FFTW2Xtrial2\FFTW2x.obj 1
Error LNK2019 unresolved external symbol die_unless referenced in function main FFTW2Xtrial2 c:\Users\aaelmeli\source\repos\FFTW2Xtrial2\FFTW2x.obj 1
Error LNK2019 unresolved external symbol check_result_c referenced in function main FFTW2Xtrial2 c:\Users\aaelmeli\source\repos\FFTW2Xtrial2\FFTW2x.obj 1
Warning LNK4272 library machine type 'x86' conflicts with target machine type 'x64' FFTW2Xtrial2 C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2018.1.156\windows\mkl\lib\intel64_win\fftw2xc_double_msvs.lib 1
Error LNK1120 7 unresolved externals FFTW2Xtrial2 c:\users\aaelmeli\source\repos\FFTW2Xtrial2\x64\Debug\FFTW2Xtrial2.exe 1
Warning C4305 'initializing': truncation from 'double' to 'float' FFTW2Xtrial2 c:\users\aaelmeli\source\repos\fftw2xtrial2\fftw2x.c 62
Warning C4244 '=': conversion from 'double' to 'float', possible loss of data FFTW2Xtrial2 c:\users\aaelmeli\source\repos\fftw2xtrial2\fftw2x.c 111
0 Kudos
Ying_H_Intel
Employee
945 Views

Hello,

Sorry for the long message , which may cause you miss the key step:

1. copy fftw2c to your desktop , which support can be wrote.  In command line, you may first run
2.  Open MSVS 2017 command line windows from start-up -> All programs -> Visual Stuido 2017-> Visual Studio tools-> developer command prompt for VS 2017 :  cd the folder

3. in command line wondows, run the command  to set MKL environment :

4. "C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2018.1.156\windows\mkl\bin\mklvars.bat" intel64
​5. nmake libintel64 compiler=msvs (not msvc)  install_dir=desktop

so under command line,  please first run

>C:\Users\aaelmeli\Desktop\fftw2xc> "C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2018.1.156\windows\mkl\bin\mklvars.bat" intel64

Then

>C:\Users\aaelmeli\Desktop\fftw2xc>nmake libintel64 compiler=msvs install_dir=desktop.

In  MSVS environment, you may need add mkl library (mkl_intel_lp64.lib mkl_sequential.lib mkl_core.lib) in your Additional Dependencies in the Linker menu.  as the discussion in Merry Christmas E1 -- Help me find dgesv 

Best Regards,

Ying

0 Kudos
Reply