<分区>
我一直在尝试在 C++
文件中使用 OpenCL
。当我尝试编译它时,它给出了很多 LNK2019 错误,例如:
unresolved external symbol _clGetPlatformIDs@12 referenced in function "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个未解析的外部符号)