C++ for OpenCL compile problem
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 25/100
Research direction
Reproduce the report using the shown test.cl contents and the clang -cl-std=CLC++ command on Ubuntu with clang 12. Check whether the failure is caused by compilation or linking, then document the supported invocation or limitation. Done means the minimal OpenCL C++ source can be processed without the reported missing-main linker error, or the expected behavior is clearly explained.
Written by the indexing model from the issue text.
Description
My envirment:
Ubuntu clang version 12.0.0-3ubuntu1~20.04.3
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
My problem:
when I do this:
$ echo "kernel void k(){}" > test.cl
$ clang -cl-std=CLC++ ./test.cl
error raises that:
/usr/bin/ld: /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crt1.o: in function _start':
(.text+0x24): undefined reference to main'
I wonder how I can solve this problem? I can't even compile the simplest .cl file which supports C++ features. Thanks guys!
- Dominant language
- CMake
- Stars
- 715
- Forks
- 70
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from KhronosGroup/OpenCL-Guide
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
KhronosGroup/OpenCL-Guide#31 ·
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
KhronosGroup/OpenCL-Guide#44 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
KhronosGroup/OpenCL-Guide#42 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
KhronosGroup/OpenCL-Guide#41 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 45/100
KhronosGroup/OpenCL-Guide#34 · 1 comment ·
All issues in KhronosGroup/OpenCL-Guide
Similar issues
-
erdos-status-sync
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
google-deepmind/formal-conjectures#6920 ·
Maintainers usually reply within 1 day
-
area-web-js web-libraries
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 4 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
objectionary/eo#9317 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
rubys/roundhouse#571 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
anthropics/buffa#639 ·
Maintainers usually reply within 3 days