You just have to tell it to do so. i.e., add -optdll--output-lib -optdlllibMyLib.a
to your --mk-dll invocation command line (suitably tweaked, of course). --sigbjorn ----- Original Message ----- From: "Lehti, Patrick " <[EMAIL PROTECTED]> To: "'Sigbjorn Finne'" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Friday, December 07, 2001 03:39 Subject: RE: Problems creating a DLL with ghc-5.02.1 > Cool, that works! But now no import library is created. I thought this done > during creating the dll? > > Patrick > > -----Original Message----- > From: Sigbjorn Finne [mailto:[EMAIL PROTECTED]] > Sent: Donnerstag, 6. Dezember 2001 16:35 > To: Lehti, Patrick > Cc: [EMAIL PROTECTED] > Subject: Re: Problems creating a DLL with ghc-5.02.1 > > > Yes, if you're willing to do the following: > > - only use the --mk-dll option when linking together object > files & archives (i.e., don't try compile a Haskell source > file and create its DLL during the same invocation of GHC). > > (Remembering to include the _stub.o files too when linking). > > - modify your package.conf file, editing the entry for the 'rts' > package to instead of having a library_dirs equal to > ["$libdir"], have it be ["$libdir", "$libdir/gcc-lib"] > > Alternatively, add the command-line option "-Lc:/ghc/ghc-5.02.1/gcc-lib" > to your ghc-5.02.1 (where c:/ghc/ghc-5.02.1 is wherever you've > got GHC installed). > > hth > --sigbjorn > > > ----- Original Message ----- > From: "Lehti, Patrick " <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, December 06, 2001 06:04 > Subject: Problems creating a DLL with ghc-5.02.1 > > > > Hi, > > > > I tried to wrap a Haskell application in a DLL using ghc-5.02.1. But this > is > > not working, with cygwin in path I got this error message: > > /usr/lib/mingw/libmingw32.a(gccmain.o)(.text+0x88):gccmain.c: multiple > > definition of `__main' > > /usr/lib/libm.a(ds00023.o)(.text+0x0): first defined here > > > > ... and without cygwin in path, it could not find "dllwrap" and "dlltool". > > > > Is there any solution for this problem? > > > > Patrick > > > > > _______________________________________________ > Glasgow-haskell-users mailing list > [EMAIL PROTECTED] > http://www.haskell.org/mailman/listinfo/glasgow-haskell-users _______________________________________________ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
