我一直在尝试OpenCL在C++文件中使用。当我尝试编译它时,它给出了很多LNK2019错误,例如:
未解析的外部符号 _clGetPlatformIDs@12 在函数“public: static int __cdecl cl::Platform::get(class std::vector > *)”中引用 (?get@Platform@cl@@SAHPAV?$vector@VPlatform@cl@ @V?$allocator@VPlatform@cl@@@@std@@@std@@@Z)
在Platform类中定义的cl.hpp,它使用clGetPlatformIds,在定义cl.h但没有付诸实施。我认为这就是问题所在。我怎样才能使代码工作?(我有 24 个未解析的外部符号)