Attempting to build an intel example on fresh Visual Studio 2022 install.
Step 1: Start a new Console C++ project
Step 2: Use VS NuGet functionality to add mkl library
Step 3: Replace template main with example code
Step 4: Add mkl paths to project properties
Step 5: Build and get error (file doesn't exist anywhere - so not a path definition error)
Sorry if this is a noob question - I haven't used mkl before.
It looks like a the NuGet packages for inteltbb were updated shortly after I posted this. (From 2021.1.1.133 to 2021.8.0.25874). I now get some unresolved externals:
1>ArmaTest2.obj : error LNK2019: unresolved external symbol MKL_malloc referenced in function main
1>ArmaTest2.obj : error LNK2019: unresolved external symbol MKL_free referenced in function main
1>ArmaTest2.obj : error LNK2019: unresolved external symbol MKL_CBWR_Set referenced in function main
1>ArmaTest2.obj : error LNK2019: unresolved external symbol MKL_CBWR_Get_Auto_Branch referenced in function main
Thanks for posting on Intel Communities.
Based on the error log shared by you, it seems the issue is while linking your source file.
Could you please cross-verify, based on the interface being used by you, whether you are linking the source file properly with the corresponding dependencies/library files? If any libraries were missing from being linked, you could link the same and let us know if issue persists.
Under the below path, you could see the library files and dll's and link the appropriate libraries.
C:\Program Files (x86)\Intel\oneAPI\mkl\<your oneAPI version>\lib\intel64
We assume that your issue is resolved. If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.