Re: [Haskell-cafe] using a win32 dll (Happy too soon)

2013-05-30 Thread Henk-Jan van Tuyl
On Thu, 30 May 2013 16:13:22 +0200, Brandon Allbery wrote: On Thu, May 30, 2013 at 3:15 AM, Kees Bleijenberg < k.bleijenb...@lijbrandt.nl> wrote: argument. The dll is in the PATH. I don't understand why it needs the -L argument. I'll figure this out later. If I use -lglasPng.dll (additional

Re: [Haskell-cafe] using a win32 dll (Happy too soon)

2013-05-30 Thread Brandon Allbery
On Thu, May 30, 2013 at 11:46 AM, Kees Bleijenberg < k.bleijenb...@lijbrandt.nl> wrote: > Brandon, thanks again for your explanation > Are you sure about the non existing search order for dynamic loaded dll’s? > I.e. > http://msdn.microsoft.com/en-us/library/windows/desktop/ms682586(v=vs.85).aspx#

Re: [Haskell-cafe] using a win32 dll (Happy too soon)

2013-05-30 Thread Kees Bleijenberg
Bleijenberg CC: haskell-cafe Onderwerp: Re: [Haskell-cafe] using a win32 dll (Happy too soon) On Thu, May 30, 2013 at 3:15 AM, Kees Bleijenberg wrote: argument. The dll is in the PATH. I don't understand why it needs the -L argument. I'll figure this out later. If I use -lglasPng.dll (addit

Re: [Haskell-cafe] using a win32 dll (Happy too soon)

2013-05-30 Thread Brandon Allbery
On Thu, May 30, 2013 at 3:15 AM, Kees Bleijenberg < k.bleijenb...@lijbrandt.nl> wrote: > argument. The dll is in the PATH. I don't understand why it needs the -L > argument. I'll figure this out later. If I use -lglasPng.dll (additional > .dll) it doesn't work either. > Unix has standard places t

Re: [Haskell-cafe] using a win32 dll (Happy too soon)

2013-05-30 Thread Kees Bleijenberg
Brandon, thank you for your explanation. I got it working with: ghc --make testGlasPng.hs -LD:\glas\dlls -lglasPng. It needs both the -L and the -l argument. The dll is in the PATH. I don't understand why it needs the -L argument. I'll figure this out later. If I use -lglasPng.dll (additional .d

Re: [Haskell-cafe] using a win32 dll (Happy too soon)

2013-05-29 Thread Brandon Allbery
On Wed, May 29, 2013 at 9:40 AM, Kees Bleijenberg < k.bleijenb...@lijbrandt.nl> wrote: > 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

Re: [Haskell-cafe] using a win32 dll (Happy too soon)

2013-05-29 Thread Robert Jakob
> 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 I get: > > testGlasPng.o: fake: (.t

Re: [Haskell-cafe] using a win32 dll

2013-05-29 Thread Kees Bleijenberg
Thank you Krzystof! This did the trick. Now I also have a better understanding what is going on. Great. Kees Van: Krzysztof Skrzętnicki [mailto:gte...@gmail.com] Verzonden: woensdag 29 mei 2013 11:58 Aan: Kees Bleijenberg Onderwerp: Re: [Haskell-cafe] using a win32 dll Oh, I didn&#

Re: [Haskell-cafe] using a win32 dll

2013-05-29 Thread Kees Bleijenberg
> On Wed, 29 May 2013 09:13:09 +0200 > "Kees Bleijenberg" wrote: > > I made a Delphi dll (32 bits windows). This dll exports a function > > named getPngVersion. This is a function with no arguments that > > returns a pointer to a array of chars. > Did you annotate the exported function with stdc

Re: [Haskell-cafe] using a win32 dll

2013-05-29 Thread Krzysztof Skrzętnicki
My first guess would be missing -l parameter. The examples you have linked read: ghc --make compname.hs -lkernel32 Best regards, Krzysztof Skrzętnicki On Wed, May 29, 2013 at 9:13 AM, Kees Bleijenberg < k.bleijenb...@lijbrandt.nl> wrote: > I made a Delphi dll (32 bits windows). This dll export

Re: [Haskell-cafe] using a win32 dll

2013-05-29 Thread Robert Jakob
On Wed, 29 May 2013 09:13:09 +0200 "Kees Bleijenberg" wrote: > I made a Delphi dll (32 bits windows). This dll exports a function > named getPngVersion. This is a function with no arguments that > returns a pointer to a array of chars. Did you annotate the exported function with stdcall? The call