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" ;
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 .
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.
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.
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
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.
It generated folder named obj_double_msvs but this folder is empty.
this is my command displays:
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.
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
>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