Hi,
there seems to be symbols (yet again) missing from the ComputeCpp libraries on Windows using ComputeCpp-CE 1.1.1 and 1.1.2. The following simple program results in linker errors, but compiles fine on Linux.
#include <CL/sycl.hpp>
int main()
{
cl::sycl::queue q{ cl::sycl::device{}, cl::sycl::property::queue::enable_profiling {} };
}
Results in
>------ Build All started: Project: Test-Applications, Configuration: MSVC-Release-dynamic ------
[1/3] Building ComputeCpp integration header file C:/Users/mnagy/CMakeBuilds/9d9bac51-f361-4537-921d-1e5e7aee3b63/build/MSVC-Release-dynamic/Main.cpp.sycl
[2/3] Building CXX object CMakeFiles\SYCL-SAXPY.dir\Main.cpp.obj
[3/3] Linking CXX executable SYCL-SAXPY.exe
FAILED: SYCL-SAXPY.exe
cmd.exe /C "cd . && "C:\Kellekek\Microsoft\Visual Studio\16\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E vs_link_exe --intdir=CMakeFiles\SYCL-SAXPY.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100177~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100177~1.0\x64\mt.exe --manifests -- C:\Kellekek\MICROS~1\VISUAL~1\16\VC\Tools\MSVC\1421~1.276\bin\Hostx64\x64\link.exe /nologo CMakeFiles\SYCL-SAXPY.dir\Main.cpp.obj CMakeFiles\SYCL-SAXPY.dir\Options.cpp.obj /out:SYCL-SAXPY.exe /implib:SYCL-SAXPY.lib /pdb:SYCL-SAXPY.pdb /version:0.0 /machine:x64 /INCREMENTAL:NO /subsystem:console C:\Kellekek\Codeplay\ComputeCpp\1.1.0\lib\ComputeCpp_vs2015.lib C:\Users\mnagy\Source\Repos\vcpkg\installed\x64-windows\lib\OpenCL.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cmd.exe /C "cd /D C:\Users\mnagy\CMakeBuilds\9d9bac51-f361-4537-921d-1e5e7aee3b63\build\MSVC-Release-dynamic && powershell -noprofile -executionpolicy Bypass -file C:/Users/mnagy/Source/Repos/vcpkg/scripts/buildsystems/msbuild/applocal.ps1 -targetBinary C:/Users/mnagy/CMakeBuilds/9d9bac51-f361-4537-921d-1e5e7aee3b63/build/MSVC-Release-dynamic/SYCL-SAXPY.exe -installedDir C:/Users/mnagy/Source/Repos/vcpkg/installed/x64-windows/bin -OutVariable out""
LINK: command "C:\Kellekek\MICROS~1\VISUAL~1\16\VC\Tools\MSVC\1421~1.276\bin\Hostx64\x64\link.exe /nologo CMakeFiles\SYCL-SAXPY.dir\Main.cpp.obj CMakeFiles\SYCL-SAXPY.dir\Options.cpp.obj /out:SYCL-SAXPY.exe /implib:SYCL-SAXPY.lib /pdb:SYCL-SAXPY.pdb /version:0.0 /machine:x64 /INCREMENTAL:NO /subsystem:console C:\Kellekek\Codeplay\ComputeCpp\1.1.0\lib\ComputeCpp_vs2015.lib C:\Users\mnagy\Source\Repos\vcpkg\installed\x64-windows\lib\OpenCL.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:SYCL-SAXPY.exe.manifest" failed (exit code 1120) with the following output:
C:\Users\mnagy\Source\Repos\Main.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) private: class std::shared_ptr<class cl::sycl::detail::property_base> * __cdecl std::vector<class std::shared_ptr<class cl::sycl::detail::property_base>,class std::allocator<class std::shared_ptr<class cl::sycl::detail::property_base> > >::_Umove(class std::shared_ptr<class cl::sycl::detail::property_base> *,class std::shared_ptr<class cl::sycl::detail::property_base> *,class std::shared_ptr<class cl::sycl::detail::property_base> *)" (__imp_?_Umove@?$vector@V?$shared_ptr@Vproperty_base@detail@sycl@cl@@@std@@V?$allocator@V?$shared_ptr@Vproperty_base@detail@sycl@cl@@@std@@@2@@std@@AEAAPEAV?$shared_ptr@Vproperty_base@detail@sycl@cl@@@2@PEAV32@00@Z) referenced in function "public: class std::shared_ptr<class cl::sycl::detail::property_base> * __cdecl std::vector<class std::shared_ptr<class cl::sycl::detail::property_base>,class std::allocator<class std::shared_ptr<class cl::sycl::detail::property_base> > >::_Emplace_reallocate<class cl::sycl::property::queue::enable_profiling *,struct std::default_delete<class cl::sycl::property::queue::enable_profiling> >(class std::shared_ptr<class cl::sycl::detail::property_base> * const,class cl::sycl::property::queue::enable_profiling * &&,struct std::default_delete<class cl::sycl::property::queue::enable_profiling> &&)" (??$_Emplace_reallocate@PEAVenable_profiling@queue@property@sycl@cl@@U?$default_delete@Venable_profiling@queue@property@sycl@cl@@@std@@@?$vector@V?$shared_ptr@Vproperty_base@detail@sycl@cl@@@std@@V?$allocator@V?$shared_ptr@Vproperty_base@detail@sycl@cl@@@std@@@2@@std@@QEAAPEAV?$shared_ptr@Vproperty_base@detail@sycl@cl@@@1@QEAV21@$$QEAPEAVenable_profiling@queue@property@sycl@cl@@$$QEAU?$default_delete@Venable_profiling@queue@property@sycl@cl@@@1@@Z)
C:\Users\mnagy\Source\Repos\Main.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) private: void __cdecl std::vector<class std::shared_ptr<class cl::sycl::detail::property_base>,class std::allocator<class std::shared_ptr<class cl::sycl::detail::property_base> > >::_Umove_if_noexcept(class std::shared_ptr<class cl::sycl::detail::property_base> *,class std::shared_ptr<class cl::sycl::detail::property_base> *,class std::shared_ptr<class cl::sycl::detail::property_base> *)" (__imp_?_Umove_if_noexcept@?$vector@V?$shared_ptr@Vproperty_base@detail@sycl@cl@@@std@@V?$allocator@V?$shared_ptr@Vproperty_base@detail@sycl@cl@@@std@@@2@@std@@AEAAXPEAV?$shared_ptr@Vproperty_base@detail@sycl@cl@@@2@00@Z) referenced in function "public: class std::shared_ptr<class cl::sycl::detail::property_base> * __cdecl std::vector<class std::shared_ptr<class cl::sycl::detail::property_base>,class std::allocator<class std::shared_ptr<class cl::sycl::detail::property_base> > >::_Emplace_reallocate<class cl::sycl::property::queue::enable_profiling *,struct std::default_delete<class cl::sycl::property::queue::enable_profiling> >(class std::shared_ptr<class cl::sycl::detail::property_base> * const,class cl::sycl::property::queue::enable_profiling * &&,struct std::default_delete<class cl::sycl::property::queue::enable_profiling> &&)" (??$_Emplace_reallocate@PEAVenable_profiling@queue@property@sycl@cl@@U?$default_delete@Venable_profiling@queue@property@sycl@cl@@@std@@@?$vector@V?$shared_ptr@Vproperty_base@detail@sycl@cl@@@std@@V?$allocator@V?$shared_ptr@Vproperty_base@detail@sycl@cl@@@std@@@2@@std@@QEAAPEAV?$shared_ptr@Vproperty_base@detail@sycl@cl@@@1@QEAV21@$$QEAPEAVenable_profiling@queue@property@sycl@cl@@$$QEAU?$default_delete@Venable_profiling@queue@property@sycl@cl@@@1@@Z)
C:\Users\mnagy\Source\Repos\Main.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) private: void __cdecl std::vector<class std::shared_ptr<class cl::sycl::detail::property_base>,class std::allocator<class std::shared_ptr<class cl::sycl::detail::property_base> > >::_Destroy(class std::shared_ptr<class cl::sycl::detail::property_base> *,class std::shared_ptr<class cl::sycl::detail::property_base> *)" (__imp_?_Destroy@?$vector@V?$shared_ptr@Vproperty_base@detail@sycl@cl@@@std@@V?$allocator@V?$shared_ptr@Vproperty_base@detail@sycl@cl@@@std@@@2@@std@@AEAAXPEAV?$shared_ptr@Vproperty_base@detail@sycl@cl@@@2@0@Z) referenced in function __catch$??$_Emplace_reallocate@PEAVenable_profiling@queue@property@sycl@cl@@U?$default_delete@Venable_profiling@queue@property@sycl@cl@@@std@@@?$vector@V?$shared_ptr@Vproperty_base@detail@sycl@cl@@@std@@V?$allocator@V?$shared_ptr@Vproperty_base@detail@sycl@cl@@@std@@@2@@std@@QEAAPEAV?$shared_ptr@Vproperty_base@detail@sycl@cl@@@1@QEAV21@$$QEAPEAVenable_profiling@queue@property@sycl@cl@@$$QEAU?$default_delete@Venable_profiling@queue@property@sycl@cl@@@1@@Z$0
C:\Users\mnagy\Source\Repos\Main.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) private: unsigned __int64 __cdecl std::vector<class std::shared_ptr<class cl::sycl::detail::property_base>,class std::allocator<class std::shared_ptr<class cl::sycl::detail::property_base> > >::_Calculate_growth(unsigned __int64)const " (__imp_?_Calculate_growth@?$vector@V?$shared_ptr@Vproperty_base@detail@sycl@cl@@@std@@V?$allocator@V?$shared_ptr@Vproperty_base@detail@sycl@cl@@@std@@@2@@std@@AEBA_K_K@Z) referenced in function "public: class std::shared_ptr<class cl::sycl::detail::property_base> * __cdecl std::vector<class std::shared_ptr<class cl::sycl::detail::property_base>,class std::allocator<class std::shared_ptr<class cl::sycl::detail::property_base> > >::_Emplace_reallocate<class cl::sycl::property::queue::enable_profiling *,struct std::default_delete<class cl::sycl::property::queue::enable_profiling> >(class std::shared_ptr<class cl::sycl::detail::property_base> * const,class cl::sycl::property::queue::enable_profiling * &&,struct std::default_delete<class cl::sycl::property::queue::enable_profiling> &&)" (??$_Emplace_reallocate@PEAVenable_profiling@queue@property@sycl@cl@@U?$default_delete@Venable_profiling@queue@property@sycl@cl@@@std@@@?$vector@V?$shared_ptr@Vproperty_base@detail@sycl@cl@@@std@@V?$allocator@V?$shared_ptr@Vproperty_base@detail@sycl@cl@@@std@@@2@@std@@QEAAPEAV?$shared_ptr@Vproperty_base@detail@sycl@cl@@@1@QEAV21@$$QEAPEAVenable_profiling@queue@property@sycl@cl@@$$QEAU?$default_delete@Venable_profiling@queue@property@sycl@cl@@@1@@Z)
C:\Users\mnagy\Source\Repos\Main.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) private: void __cdecl std::vector<class std::shared_ptr<class cl::sycl::detail::property_base>,class std::allocator<class std::shared_ptr<class cl::sycl::detail::property_base> > >::_Change_array(class std::shared_ptr<class cl::sycl::detail::property_base> * const,unsigned __int64,unsigned __int64)" (__imp_?_Change_array@?$vector@V?$shared_ptr@Vproperty_base@detail@sycl@cl@@@std@@V?$allocator@V?$shared_ptr@Vproperty_base@detail@sycl@cl@@@std@@@2@@std@@AEAAXQEAV?$shared_ptr@Vproperty_base@detail@sycl@cl@@@2@_K1@Z) referenced in function "public: class std::shared_ptr<class cl::sycl::detail::property_base> * __cdecl std::vector<class std::shared_ptr<class cl::sycl::detail::property_base>,class std::allocator<class std::shared_ptr<class cl::sycl::detail::property_base> > >::_Emplace_reallocate<class cl::sycl::property::queue::enable_profiling *,struct std::default_delete<class cl::sycl::property::queue::enable_profiling> >(class std::shared_ptr<class cl::sycl::detail::property_base> * const,class cl::sycl::property::queue::enable_profiling * &&,struct std::default_delete<class cl::sycl::property::queue::enable_profiling> &&)" (??$_Emplace_reallocate@PEAVenable_profiling@queue@property@sycl@cl@@U?$default_delete@Venable_profiling@queue@property@sycl@cl@@@std@@@?$vector@V?$shared_ptr@Vproperty_base@detail@sycl@cl@@@std@@V?$allocator@V?$shared_ptr@Vproperty_base@detail@sycl@cl@@@std@@@2@@std@@QEAAPEAV?$shared_ptr@Vproperty_base@detail@sycl@cl@@@1@QEAV21@$$QEAPEAVenable_profiling@queue@property@sycl@cl@@$$QEAU?$default_delete@Venable_profiling@queue@property@sycl@cl@@@1@@Z)
C:\Users\mnagy\Source\Repos\Main.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) private: static void __cdecl std::vector<class std::shared_ptr<class cl::sycl::detail::property_base>,class std::allocator<class std::shared_ptr<class cl::sycl::detail::property_base> > >::_Xlength(void)" (__imp_?_Xlength@?$vector@V?$shared_ptr@Vproperty_base@detail@sycl@cl@@@std@@V?$allocator@V?$shared_ptr@Vproperty_base@detail@sycl@cl@@@std@@@2@@std@@CAXXZ) referenced in function "public: class std::shared_ptr<class cl::sycl::detail::property_base> * __cdecl std::vector<class std::shared_ptr<class cl::sycl::detail::property_base>,class std::allocator<class std::shared_ptr<class cl::sycl::detail::property_base> > >::_Emplace_reallocate<class cl::sycl::property::queue::enable_profiling *,struct std::default_delete<class cl::sycl::property::queue::enable_profiling> >(class std::shared_ptr<class cl::sycl::detail::property_base> * const,class cl::sycl::property::queue::enable_profiling * &&,struct std::default_delete<class cl::sycl::property::queue::enable_profiling> &&)" (??$_Emplace_reallocate@PEAVenable_profiling@queue@property@sycl@cl@@U?$default_delete@Venable_profiling@queue@property@sycl@cl@@@std@@@?$vector@V?$shared_ptr@Vproperty_base@detail@sycl@cl@@@std@@V?$allocator@V?$shared_ptr@Vproperty_base@detail@sycl@cl@@@std@@@2@@std@@QEAAPEAV?$shared_ptr@Vproperty_base@detail@sycl@cl@@@1@QEAV21@$$QEAPEAVenable_profiling@queue@property@sycl@cl@@$$QEAU?$default_delete@Venable_profiling@queue@property@sycl@cl@@@1@@Z)
C:\Users\mnagy\Source\Repos\Main.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) private: class std::allocator<class std::shared_ptr<class cl::sycl::detail::property_base> > & __cdecl std::vector<class std::shared_ptr<class cl::sycl::detail::property_base>,class std::allocator<class std::shared_ptr<class cl::sycl::detail::property_base> > >::_Getal(void)" (__imp_?_Getal@?$vector@V?$shared_ptr@Vproperty_base@detail@sycl@cl@@@std@@V?$allocator@V?$shared_ptr@Vproperty_base@detail@sycl@cl@@@std@@@2@@std@@AEAAAEAV?$allocator@V?$shared_ptr@Vproperty_base@detail@sycl@cl@@@std@@@2@XZ) referenced in function "public: __cdecl cl::sycl::property_list::property_list<class cl::sycl::property::queue::enable_profiling,void,void>(class cl::sycl::property::queue::enable_profiling &&)" (??$?0Venable_profiling@queue@property@sycl@cl@@XX@property_list@sycl@cl@@QEAA@$$QEAVenable_profiling@queue@property@12@@Z)
C:\Users\mnagy\Source\Repos\SYCL-SAXPY.exe : fatal error LNK1120: 7 unresolved externals
ninja: build stopped: subcommand failed.
Build All failed.
Am I doing domething wrong?