KhronosGroup / KhronosGroup/OpenCL-Headers

编译生成只是cl头文件和一些.cmake,没有生成libopencl.so的库

Open
#272 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
766
Forks
273
Avg merge
2d 2h
Merged PRs (30d)
3

Description

编译生成只是cl头文件和一些.cmake,没有生成libopencl.so的库。在调用这个的时候,报了
```
/usr/bin/ld: main.cpp:(.text+0x350): undefined reference to `clGetDeviceIDs'
/usr/bin/ld: main.cpp:(.text+0x378): undefined reference to `clCreateContext'
/usr/bin/ld: main.cpp:(.text+0x398): undefined reference to `clCreateCommandQueue'
/usr/bin/ld: main.cpp:(.text+0x3bc): undefined reference to `clCreateProgramWithSource'
/usr/bin/ld: main.cpp:(.text+0x3fc): undefined reference to `clBuildProgram'
/usr/bin/ld: main.cpp:(.text+0x430): undefined reference to `clGetProgramBuildInfo'
/usr/bin/ld: main.cpp:(.text+0x460): undefined reference to `clGetProgramBuildInfo'
/usr/bin/ld: main.cpp:(.text+0x498): undefined reference to `clCreateKernel'
/usr/bin/ld: main.cpp:(.text+0x4c0): undefined reference to `clCreateBuffer'
/usr/bin/ld: main.cpp:(.text+0x4e8): undefined reference to `clCreateBuffer'
```
那么应该怎么处理

Contributor guide

No contributing guide indexed for this repository

Research direction

Review the generated OpenCL headers and CMake files described in the report, then trace how the reported linker invocation is expected to obtain the OpenCL library. Confirm whether producing libopencl.so is in scope for OpenCL-Headers and what the documented completion criteria should be for this question.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, cmake
Domain
build-system
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.