Intel® oneAPI DPC++/C++ Compiler
Talk to fellow users of Intel® oneAPI DPC++/C++ Compiler and companion tools like Intel® oneAPI DPC++ Library, Intel® DPC++ Compatibility Tool, and Intel® Distribution for GDB*
663 Discussions

Error's while trying to build intel one API Sample's

Adithya02
Beginner
524 Views
I'm trying to build Intel one api sample Base_Vector_Add.

i'm getting multiple error attached in the picture.

i learnt that this might be due to a conflict between the Intel oneAPI DPC++/C++ Compiler and the Microsoft Visual Studio compiler.

also in intel doc's it has been mentioned that intel oneApi version 2024.1 (which i have installed) is comptable with VS 2022 17.9.2 but I'm using VS 2022 17.9.7 not able to rollback too as it is a community version

how do i fix this or how do i Roll back my Visual studio code.

0 Kudos
3 Replies
Alex_Y_Intel
Moderator
474 Views

Intel oneAPI Base toolkit currently supports only up to Visual Studio 17.9.2. So maybe you can try to uninstall your Visual Studio and then install the older version? 

0 Kudos
Adithya02
Beginner
450 Views

But as I'm using community version i cannot roll back, also i have tried with Visual Studio professional 17.9.2 still I'm encountering the same error

0 Kudos
Alex_Y_Intel
Moderator
397 Views

Not sure what you did since you didn't provide a reproducer and the exact commands used, but from your attached picture I assumed you used the https://github.com/oneapi-src/oneAPI-samples/tree/master/DirectProgramming/C%2B%2BSYCL/DenseLinearAlgebra/vector-add

I gave it a try and it worked perfectly fine. Did you follow the instruction? From the error message you seemed to include some headers twice or link libraries twice, but I can't be really sure without further information. 


C:\Users\Downloads\oneAPI-samples-master\oneAPI-samples-master\DirectProgramming\C++SYCL\DenseLinearAlgebra\vector-add\build>cmake -G "NMake Makefiles" ..
CMake Deprecation Warning at C:/Program Files/Microsoft Visual Studio/2022/Professional/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/CMakeForceCompiler.cmake:89 (message):
The CMAKE_FORCE_CXX_COMPILER macro is deprecated. Instead just set
CMAKE_CXX_COMPILER and allow CMake to identify the compiler.
Call Stack (most recent call first):
CMakeLists.txt:8 (CMAKE_FORCE_CXX_COMPILER)


CMake Deprecation Warning at CMakeLists.txt:12 (cmake_minimum_required):
Compatibility with CMake < 3.5 will be removed from a future version of
CMake.

Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.


-- FPGA_DEVICE was not specified.
Configuring the design to target the default FPGA family (Intel Agilex® 7).
Please refer to the README for information on board selection.
-- Configuring done (0.3s)
-- Generating done (0.1s)
-- Build files have been written to: C:/Users/ayu1/Downloads/oneAPI-samples-master/oneAPI-samples-master/DirectProgramming/C++SYCL/DenseLinearAlgebra/vector-add/build

C:\UsersDownloads\oneAPI-samples-master\oneAPI-samples-master\DirectProgramming\C++SYCL\DenseLinearAlgebra\vector-add\build>nmake cpu-gpu

Microsoft (R) Program Maintenance Utility Version 14.39.33523.0
Copyright (C) Microsoft Corporation. All rights reserved.

[ 50%] Building CXX object src/CMakeFiles/vector-add-buffers.dir/vector-add-buffers.cpp.obj
Intel(R) oneAPI DPC++/C++ Compiler for applications running on Intel(R) 64, Version 2024.1.0 Build 20240308
Copyright (C) 1985-2024 Intel Corporation. All rights reserved.

[100%] Linking CXX executable ..\vector-add-buffers.exe
Intel(R) oneAPI DPC++/C++ Compiler for applications running on Intel(R) 64, Version 2024.1.0 Build 20240308
Copyright (C) 1985-2024 Intel Corporation. All rights reserved.


[100%] Built target vector-add-buffers
[100%] Built target cpu-gpu

C:\Users\Downloads\oneAPI-samples-master\oneAPI-samples-master\DirectProgramming\C++SYCL\DenseLinearAlgebra\vector-add\build>dir
Volume in drive C is IntelBuild
Volume Serial Number is D848-CB49

Directory of C:\Users\Downloads\oneAPI-samples-master\oneAPI-samples-master\DirectProgramming\C++SYCL\DenseLinearAlgebra\vector-add\build

05/22/2024 12:27 PM <DIR> .
05/22/2024 12:22 PM <DIR> ..
05/22/2024 12:25 PM 13,244 CMakeCache.txt
05/22/2024 12:27 PM <DIR> CMakeFiles
05/22/2024 12:25 PM 2,030 cmake_install.cmake
05/22/2024 12:25 PM 10,685 Makefile
05/22/2024 12:25 PM <DIR> src
05/22/2024 12:27 PM 120,832 vector-add-buffers.exe
4 File(s) 146,791 bytes
4 Dir(s) 548,056,064,000 bytes free

C:\Users\Downloads\oneAPI-samples-master\oneAPI-samples-master\DirectProgramming\C++SYCL\DenseLinearAlgebra\vector-add\build>vector-add-buffers.exe
Running on device: Intel(R) HD Graphics 630
Vector size: 10000

0 Kudos
Reply