我为我们当前需要OpenCL的Projekt设置我的PC(Win 7 Ultimate 64 CPU AMD/GPU AMD)时遇到了一个奇怪的问题.
我有MSYS所以我正在使用gcc进行mingw.我拼命想要编写一个名为openclexample的简单工作.
注意:包含"openclexample"的目录包含一个lib文件夹,其中包括重新实现的libOpenCL.a,OpenCL.lib和OVDecode64.lib.
Windows/system32中的OpenCL.dll
现在当我尝试编译时使用
$ gcc -std=c99 -lOpenCL -o openclexample.exe openclexample.c
Run Code Online (Sandbox Code Playgroud)
我得到的是OpenCL.def中所有funktions侦听中的一堆未定义的引用错误
Ani@ANYONE /d/StuPro/OpenCLtests
$ gcc -std=c99 -lOpenCL -o openclexample.exe openclexample.c
openclexample.c: In function 'main':
openclexample.c:214:3: warning: implicit declaration of function 'srandom' [-Wim
plicit-function-declaration]
openclexample.c:217:7: warning: implicit declaration of function 'random' [-Wimp
licit-function-declaration]
C:\Users\Ani\AppData\Local\Temp\ccOLx5XT.o:openclexample.c:(.text+0x35): undefin
ed reference to `clGetDeviceIDs@24'
C:\Users\Ani\AppData\Local\Temp\ccOLx5XT.o:openclexample.c:(.text+0x8c): undefin
ed reference to `clCreateContext@24'
C:\Users\Ani\AppData\Local\Temp\ccOLx5XT.o:openclexample.c:(.text+0xd9): undefin
ed reference to `clCreateCommandQueue@20'
C:\Users\Ani\AppData\Local\Temp\ccOLx5XT.o:openclexample.c:(.text+0x127): undefi
ned reference to `clCreateProgramWithSource@20'
C:\Users\Ani\AppData\Local\Temp\ccOLx5XT.o:openclexample.c:(.text+0x17f): undefi
ned reference to `clBuildProgram@24' …Run Code Online (Sandbox Code Playgroud)