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
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 " <Patrick.Lehti@softwareag.com> To: <glasgow-haskell-users@haskell.org> 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
participants (2)
-
Lehti, Patrick -
Sigbjorn Finne