robvanmieghem / gominer

GPU miner for siacoin in go
BSD 2-Clause "Simplified" License
159 stars 73 forks source link

cannot find -lOpenCL #7

Closed sunshinekitty closed 8 years ago

sunshinekitty commented 8 years ago

Forgive me if Windows installs aren't supported, but I'm running into the following issue when trying to build on Windows 10 with mingw64 and an nvidia gpu.

$ go get github.com/robvanmieghem/gominer
# github.com/robvanmieghem/go-opencl/cl
/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/../../../../x86_64-pc-cygwin/bin/ld: cannot find -lOpenCL
collect2: error: ld returned 1 exit status

I'll keep trying to get this working, but thought I'd post in case you know the solution off hand.

robvanmieghem commented 8 years ago

It means that the linker can not find the OpenCL library. You have to set the library path properly for the linker to find it. For example, in powershell, on a system with the intel sdk installed, you can execute the following command before executing go get or go build:

PS>  $env:LIBRARY_PATH = "C:\Program Files (x86)\Intel\OpenCL SDK\lib\x64"