Skip to content

C++ for OpenCL compile problem #14

@Glinttsd

Description

@Glinttsd

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions