When I'm trying to build any code using OpenCL with:
ghc -lOpenCL --make Test.hs
ghc: /home/tomek/.cabal/lib/OpenCL-22.214.171.124/ghc-7.4.1/HSOpenCL-126.96.36.199.o: unknown symbol `clGetDeviceIDs'
It's the same for cabal-ghci in project using OpenCL, still, it works with runhaskell -lOpenCL Test.hs
it looks like adding "extra-libraries: OpenCL" in Library section of cabal file fixes this issue.
I'm outside until next week, when I'll be able to test it. But, I seems to me that its one of the differences between platforms. What platform are you using? I test it on Linux, and I apply several changes to allow Windows and Macos build, but I don't test it.
Please check out my branch, I have just added patch mgajda@6843b74 that fixes it.
The symptom is correct linking with ghci -lOpenCL, but unable to compile executable.
@mgajda So it's not just me having this problem :-) I'm using a fix similar to yours.
@zhensydow this looks like a show-stopper on Linux, will you make a minor release to get this fixed on hackage?
@roverorna I like to, but currently I have no computer to test it. As soon as posible I put it in a release.
@mgajda i'll try to get this change in own branch
@zhensydow I tested it works on both Linux and Mac. Now GHCi needs -lOpenCL no more.
@roverorna I just put the changes in hackage 188.8.131.52
@mgajda thanks again