[Haskell-cafe] using a win32 dll (Happy too soon)
Robert Jakob
robert.jakob at bitflipper.de
Wed May 29 16:04:48 CEST 2013
> If I compile with ghc --make testGlasPng.hs -lglasPng I
> get: ..\ld.exe: cannot find -lglasPng. Collect 2: ld returned 1 exit
> status.
>
> Ld can't find lglasPng (with the l in front, does it trim the l?).
> Why? Okay I try
>
> ghc --make testGlasPng.hs -L<path to glasPng.dll> I get:
>
> testGlasPng.o: fake: (.text + 0x82) :undefined reference to
> 'getPngVersion at 0'. I think it has found the dll, but it complains the
> function is not in the dll. But TDump and Dll export viewer say
> getPngVersion is in the dll.
I think you should use both -L and -l.
ghc --make testGlasPng.hs -L/path/to/folder/where/glasPng/is -lglasPng
-L should point to the folder, NOT the dll itself.
Hope this helps.
R.
More information about the Haskell-Cafe
mailing list