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

Brian Hulley brianh at
Tue Jan 17 17:31:10 EST 2006

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 file and 
hit F6 the VS project will build then on the command line if I type 
ghc --make main.hs the Haskell program will be built so that when I type 
"main" on the command line it will run and call the C++ function.

Sorry if this all sounds too basic but I don't know how to compile C++ from 
the command line at all or how to use make files, and I need to use the 
Visual Studio compiler because my own C++ code relies on Microsoft 



More information about the Glasgow-haskell-users mailing list