Re: Linking with C++ produced by Visual Studio .NET on Windows XP?

2006-02-03 Thread Geoffrey Alan Washburn
Cyril Schmidt wrote: I added this to the FAQ list; please feel free to elaborate and correct. Linking to Visual Studio-generated code would be much easier if GHC were able to use Visual C++ as backend, instead of gcc (even Visual Haskell at the moment relies on gcc for C compilation). I

Re: Linking with C++ produced by Visual Studio .NET on Windows XP?

2006-02-03 Thread Krasimir Angelov
I think that the C backend is heavily dependent on various GCC pragmas but it should be relatively easy to do assembly backend that produces MASM code. Cheers, Krasimir 2006/2/3, Geoffrey Alan Washburn [EMAIL PROTECTED]: Cyril Schmidt wrote: I added this to the FAQ list; please feel free

Re: Linking with C++ produced by Visual Studio .NET on Windows XP?

2006-02-03 Thread Simon Marlow
Krasimir Angelov wrote: I think that the C backend is heavily dependent on various GCC pragmas but it should be relatively easy to do assembly backend that produces MASM code. That's something I'd like to do (or see somebody else do), if only to make debugging Haskell DLLs a bit easier;

Re: Linking with C++ produced by Visual Studio .NET on Windows XP?

2006-01-27 Thread Cyril Schmidt
I added this to the FAQ list; please feel free to elaborate and correct. Linking to Visual Studio-generated code would be much easier if GHC were able to use Visual C++ as backend, instead of gcc (even Visual Haskell at the moment relies on gcc for C compilation). I have no idea, though, how

Re: Linking with C++ produced by Visual Studio .NET on Windows XP?

2006-01-24 Thread Cyril Schmidt
Brian Hulley wrote: Thanks. The only problem is that dlltool doesn't work because I don't have cygwin installed. dlltool usually comes with the Windows distribution of GHC (at least GHC 6.4 and 6.4.1 have it; check gcc-lib directory). Cheers Cyril

Re: Linking with C++ produced by Visual Studio .NET on Windows XP?

2006-01-24 Thread Brian Hulley
Cyril Schmidt wrote: Brian Hulley wrote: Thanks. The only problem is that dlltool doesn't work because I don't have cygwin installed. dlltool usually comes with the Windows distribution of GHC (at least GHC 6.4 and 6.4.1 have it; check gcc-lib directory). Thanks - I wonder why they didn't

Re: Linking with C++ produced by Visual Studio .NET on Windows XP?

2006-01-24 Thread Brian Hulley
Brian Hulley wrote: and compiled with ghc -fglasgow-exts --make Main.hs -optl-lTestDLL -optl-L Oops! I see I missed out the . which I'd not realised was part of the command line (seems the linker need to be told explicity to look in the current directory also), so it links using: ghc

Re: Linking with C++ produced by Visual Studio .NET on Windows XP?

2006-01-24 Thread Brian Hulley
Brian Hulley wrote: Brian Hulley wrote: and compiled with ghc -fglasgow-exts --make Main.hs -optl-lTestDLL -optl-L Oops! I see I missed out the . which I'd not realised was part of the command line (seems the linker need to be told explicity to look in the current directory also), so it

Re: Linking with C++ produced by Visual Studio .NET on Windows XP?

2006-01-23 Thread Cyril Schmidt
I am far from being an expert, but I have seen no answer to your question so far, so I'll tell how I'd do it (however ugly that might be). I don't have a sample project, but it should be fairly easy to make it. 1. Make a DLL project in Visual Studio. VS will create a .vcproj and .sln files for

RE: Linking with C++ produced by Visual Studio .NET on Windows XP?

2006-01-23 Thread Simon Peyton-Jones
GHC now makes it easy for all users to contribute new documentation about GHC to help other users, by adding to the GHC documentation wiki. See the Collaborative documentation heading on http://haskell.org/haskellwiki/GHC:Documentation Linking to C++ would be an ideal topic. It's a

Re: Linking with C++ produced by Visual Studio .NET on Windows XP?

2006-01-23 Thread Brian Hulley
Cyril Schmidt wrote: I am far from being an expert, but I have seen no answer to your question so far, so I'll tell how I'd do it (however ugly that might be). I don't have a sample project, but it should be fairly easy to make it. 1. Make a DLL project in Visual Studio. VS will create a

Linking with C++ produced by Visual Studio .NET on Windows XP?

2006-01-17 Thread Brian Hulley
Hi - I'm wondering if anyone has a simple Visual Studio .NET C++ project that would demonstrate how to link C++ with Haskell (or vice versa). Ie a .sln, .vcproj, .cpp, and .h file containing one C++ function and a Haskell file main.hs that calls this function, so that if I click on the .sln