
I don't know if you got a reply to his message. (You should send GHC-specific mail to glasgow-haskell-users, not the main Haskell list, incidentally.) I'm not confident that creating Haskell DLLs is working at the moment. Has anyone else done it? Trouble is, there isn't yet a critical mass of DLL users to be sure that it works and stays working. Which is a bit of a chicken and egg problem. Windows programmers unite! Simon -----Original Message----- From: Mauricio Carvalho [mailto:m.decarvalho@telia.com] Sent: 03 December 2002 14:13 To: haskell@haskell.org Subject: Calling ghc dll's with MSVC++ code Hey! I need to call haskell DLL's from a c++ program, and this C++ is written in Microsoft's Visual C++ 6.0 I created the DLL sing the directives given at ghc user's guide (11.3 and 11.4) and created the dll. To create a .lib import file, I linked with the option -optdll--output-lib -optdllMyDll.lib I can compile and link my C++ problem, but when I run it, it crashes. I tried even to create a DLL from a C source I'm sure it works (as I created the DLL before with MSVC++ environment, and I could make it work out), and even this DLL crashes whe its functions are accessed. I'm using GHC 5.0.4.1 Is there some special command lines that must be used to create DLLs to be used with windows? Or is there some known difficulty doing it? Someone that succeded can please tell me exactly how was it done? If more info is needed, I can send the sources and command lines I used to compile. ps: I'm not using cygwin (i don't have it installed in my computer actually), but as far as I understood, it shouldn't be a problem ´Thanks for help! Mauricio
participants (1)
-
Simon Peyton-Jones