
The environment variable should probably be LIBRARY_PATH; I use a semicolon as separator. See also LD_LIBRARY_PATH vs LIBRARY_PATH[0].
yes, it's LIBRARY_PATH. The x64 version of cuda.lib is not recognized at all (same error message as if the file was not existent). The Win32 version "works", but results in configure:3627: c:\HaskellPlatform\2012.4.0.0\mingw\bin\gcc.exe -o conftest.exe -Wl,--hash-size=31 -Wl,--reduce-memory-overheads -I/c/CUDA/NVIDIA_GPU_Computing_Toolkit/CUDA/v4.1/include -L/c/CUDA/NVIDIA_GPU_Computing_Toolkit/CUDA/v4.1/lib conftest.c -lcuda >&5 C:\Users\Peter\AppData\Local\Temp\ccOwCQ6n.o:conftest.c:(.text+0xc): undefined reference to `cuDriverGetVersion' collect2: ld returned 1 exit status I ran nm on cuda.lib and got the entry nvcuda.dll: 00000000 I .idata$4 00000000 I .idata$5 00000000 I .idata$6 00000000 T .text U _IMPORT_DESCRIPTOR_nvcuda 00000000 I _imp__cuDriverGetVersion@4 00000000 T cuDriverGetVersion@4 this looks ok so far. Running nm on the x64 version of the lib file results in rubbish output (consistent with the observation above). I understand that LD_LIBRARY_PATH is used to look up to dll when running the program (is that correct?). However we are not at this point yet, are we, since the error occurs on the gcc invocation ?
Try my fork:
https://github.com/mainland/cuda
In particular, read WINDOWS.md.
I also read Geoffreys WINDOWS.md and understood that configuring dll names are only necessary when using ghci, not for compiled programs (nothing to do for this case ?) and in particular not for installing the package ? Actually the dll is not named nvcuda.dll as indicated in the nm output, but rather cudart32_41_28.dll I suppose and this file is located in the bin subfolder. I should set LD_LIBRARY_PATH to the bin folder, yes ? Should I configure this dll name for package installation already (i.e. in addition to what is mentioned in WINDOWS.md) ? If yes, how ? Thank you Peter