We have a large code base and want to test out oneAPI for the Math and optimization. We had Unit Tests for the system but when I include sycl.hpp and switch to the Intel C++ 2023 compiler I get the following error:
could not open 'x64\Microsoft.VisualStudio.TestTools.CppUnitTestFramework.lib': no such file or directory
This was found before but seems that when I switch to the DPC++ Compiler the linker can no longer find Microsoft.VisualStudio.TestTools.CppUnitTestFramework.lib. Does anyone have an idea?
Experimented with the additional libraries.
This question was also asked (by the same OP) on the Intel forums. They have provided a workaround that apparently works with VS2022 and Intel DPC++2023. (It does not work with VS2019 and Intel Classic C++ 2023 - for me.)
Their workaround involves copying the relevant Microsoft.VisualStudio.TestTools.CppUnitTestFramework.lib file to the solution folder. The file can be found in: "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\VS\UnitTest\lib" and then in a subdirectory according the architecture.
This failed to resolve the issue for the compiler and IDE I have, as the Intel compiler appears to take the #pragma comment (lib, ...) entry as a discrete filename, but the Microsoft header file has this:
The file is in "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\VS\UnitTest\include"
editing this file (not recommended) to remove the arch folder prefix, and modifying the vcxproj file to append it does allow the unit test dll to compile with the Intel classic compiler, as it can then find the lib to include.
However, VS Test Explorer fails to find the dll when searching for tests.
Here is the link to that post and Intel's answer:
https://community.intel.com/t5/Intel-oneAPI-Data-Parallel-C/Visual-Studio-2022-Unit-Tests-and-DPC-Compiler/m-p/1490482#M3110