RE: unable to create DLL with GHC 5.04
The thing to do is to use ghc as your C compiler. It will entirely ingore your path etc, and will faithfully use the mingw stuff, give the compiler the right flags etc. Perhaps this possibility is not stated clearly enough in the manual; I see that Sigbjorn committed a note about it yesterday in response to your mail S | -Original Message- | From: Mark Tehver [mailto:[EMAIL PROTECTED]] | Sent: 12 July 2002 12:48 | To: Sigbjorn Finne | Cc: [EMAIL PROTECTED] | Subject: Re: unable to create DLL with GHC 5.04 | | | On Thu, 11 Jul 2002, Sigbjorn Finne wrote: | | Hi, | | looks as if you're mixing mingw and cygwin object | files. ghc-5.04 is mingw-based, so make sure you | feed in the flag -mno-cygwin to gcc when compiling | .c files. | | | Yes, you are right - I have cygwin installed and seems that | ghc uses gcc.exe and ld.exe from cygwin directory and not the | ones from ghc-5.04/gcc-lib. The problem seems to be that | cygwin bin directories are in front of ghc bin directories in | my path. When I put the directories in reverse order, | everything seems ok. But note that previous ghc versions did | not require that. So I still think something is wrong... | | Besides, even if I put gcc bin directories in front of cygwin | bin directories, ld.exe complains about missing dllcrt2.o | file although it is present in ghc-5.04/gcc-lib directory. | | Regards, | Mark | | ___ | Glasgow-haskell-bugs mailing list | [EMAIL PROTECTED] | http://www.haskell.org/mailman/listinfo/glasgow-| haskell-bugs | ___ Glasgow-haskell-bugs mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
unable to create DLL with GHC 5.04
Hi! I seem to have some problem building DLLs under Win32 with GHC 5.04. When I follow the instructions from http://haskell.cs.yale.edu/ghc/docs/latest/html/users_guide/win32-dlls-foreign.html all looks ok until I do the last step. Then linker reports: /usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/../../../../i686-pc-cygwin/bin/ld: warning: cannot find entry symbol _DllMainCRTStartup@12; defaulting to 63601000 C:/ghc/ghc-5.04/libHSrts.a(StgMiscClosures.o)(.text+0xab1):StgMiscClosures.hc: undefined reference to `_imp___iob' C:/ghc/ghc-5.04/libHSrts.a(StgMiscClosures.o)(.text+0xae5):StgMiscClosures.hc: undefined reference to `_imp___iob' C:/ghc/ghc-5.04/libHSrts.a(StgMiscClosures.o)(.text+0xb19):StgMiscClosures.hc: undefined reference to `_imp___iob' C:/ghc/ghc-5.04/libHSrts.a(StgMiscClosures.o)(.text+0xb4d):StgMiscClosures.hc: undefined reference to `_imp___iob' C:/ghc/ghc-5.04/libHSrts.a(StgMiscClosures.o)(.text+0xb81):StgMiscClosures.hc: undefined reference to `_imp___iob' C:/ghc/ghc-5.04/libHSrts.a(StgMiscClosures.o)(.text+0xbb5):StgMiscClosures.hc: more undefined references to `_imp___iob' follow collect2: ld returned 1 exit status dllwrap: gcc exited with status 1 With GHC 5.02.x all seemed to work fine... Best regards, Mark ___ Glasgow-haskell-bugs mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: unable to create DLL with GHC 5.04
Hi, looks as if you're mixing mingw and cygwin object files. ghc-5.04 is mingw-based, so make sure you feed in the flag -mno-cygwin to gcc when compiling .c files. --sigbjorn - Original Message - From: Mark Tehver [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, July 11, 2002 12:42 Subject: unable to create DLL with GHC 5.04 Hi! I seem to have some problem building DLLs under Win32 with GHC 5.04. When I follow the instructions from http://haskell.cs.yale.edu/ghc/docs/latest/html/users_guide/win32-dlls-forei gn.html all looks ok until I do the last step. Then linker reports: /usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/../../../../i686-pc-cygwin/bin/ld: warning: cannot find entry symbol _DllMainCRTStartup@12; defaulting to 63601000 C:/ghc/ghc-5.04/libHSrts.a(StgMiscClosures.o)(.text+0xab1):StgMiscClosures.h c: undefined reference to `_imp___iob' C:/ghc/ghc-5.04/libHSrts.a(StgMiscClosures.o)(.text+0xae5):StgMiscClosures.h c: undefined reference to `_imp___iob' C:/ghc/ghc-5.04/libHSrts.a(StgMiscClosures.o)(.text+0xb19):StgMiscClosures.h c: undefined reference to `_imp___iob' C:/ghc/ghc-5.04/libHSrts.a(StgMiscClosures.o)(.text+0xb4d):StgMiscClosures.h c: undefined reference to `_imp___iob' C:/ghc/ghc-5.04/libHSrts.a(StgMiscClosures.o)(.text+0xb81):StgMiscClosures.h c: undefined reference to `_imp___iob' C:/ghc/ghc-5.04/libHSrts.a(StgMiscClosures.o)(.text+0xbb5):StgMiscClosures.h c: more undefined references to `_imp___iob' follow collect2: ld returned 1 exit status dllwrap: gcc exited with status 1 With GHC 5.02.x all seemed to work fine... Best regards, Mark ___ Glasgow-haskell-bugs mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs ___ Glasgow-haskell-bugs mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs