Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Windows] error on exercise 1: '...' is not a member of '`global namespace'' #77

Open
razetime opened this issue Sep 16, 2023 · 0 comments

Comments

@razetime
Copy link

I have installed opencl on windows with the help of visual studio devtools and vcpkg.

I cd'd into the folder Exercises/Exercise01 and I tried running the file with the following command:

cl.exe /nologo /W4 /DCL_TARGET_OPENCL_VERSION=100 /EHsc /IC:\dev\vcpkg\installed\x64-windows\include\ /IC:\Users\raghu\Documents\code\practice\opcl_data\Exercises\Cpp_common\ DeviceInfo.cpp /Fe:DeviceInfo /link /LIBPATH:C:\Users\raghu\Documents\code\soft\vcpkg\installed\x64-windows\lib OpenCL.lib

I did not use the makefile as it was incompatible with nmake. I got the following errors:

DeviceInfo.cpp
C:\Users\raghu\Documents\code\practice\opcl_data\Exercises\Cpp_common\cl.hpp(5363): error C2039: 'clEnqueueReadBufferRect': is not a member of '`global namespace''
C:\Users\raghu\Documents\code\practice\opcl_data\Exercises\Cpp_common\cl.hpp(5363): error C3861: 'clEnqueueReadBufferRect': identifier not found
C:\Users\raghu\Documents\code\practice\opcl_data\Exercises\Cpp_common\cl.hpp(5402): error C2039: 'clEnqueueWriteBufferRect': is not a member of '`global namespace''
C:\Users\raghu\Documents\code\practice\opcl_data\Exercises\Cpp_common\cl.hpp(5402): error C3861: 'clEnqueueWriteBufferRect': identifier not found
C:\Users\raghu\Documents\code\practice\opcl_data\Exercises\Cpp_common\cl.hpp(5440): error C2039: 'clEnqueueCopyBufferRect': is not a member of '`global namespace''
C:\Users\raghu\Documents\code\practice\opcl_data\Exercises\Cpp_common\cl.hpp(5440): error C3861: 'clEnqueueCopyBufferRect': identifier not found
C:\Users\raghu\Documents\code\practice\opcl_data\Exercises\Cpp_common\err_code.h(62): error C2065: 'CL_MISALIGNED_SUB_BUFFER_OFFSET': undeclared identifier
C:\Users\raghu\Documents\code\practice\opcl_data\Exercises\Cpp_common\err_code.h(64): error C2065: 'CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST': undeclared identifier
C:\Users\raghu\Documents\code\practice\opcl_data\Exercises\Cpp_common\err_code.h(134): error C2065: 'CL_INVALID_PROPERTY': undeclared identifier
C:\Users\raghu\Documents\code\practice\opcl_data\Exercises\Cpp_common\err_code.h(62): error C2051: case expression not constant
C:\Users\raghu\Documents\code\practice\opcl_data\Exercises\Cpp_common\err_code.h(64): error C2051: case expression not constant
C:\Users\raghu\Documents\code\practice\opcl_data\Exercises\Cpp_common\err_code.h(134): error C2051: case expression not constant
DeviceInfo.cpp(56): error C2065: 'CL_DEVICE_OPENCL_C_VERSION': undeclared identifier

What is a possible reason that this could happen? I am running Microsoft (R) C/C++ Optimizing Compiler Version 19.37.32824 for x64.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant