Problems creating Haskell-dll without -fvia-C

Hi! I recently read a haskell-cafe-thread telling me that the compiler option -fvia-C will be removed. This gets me a bit worried... I use -fvia-C when I build my haskell dll, and it works just fine (Haskell 2010.2.0.0): ghc -c Adder.hs -O2 -fvia-C ghc -c StartEnd.c ghc -shared -o Adder.dll Adder.o Adder_stub.o StartEnd.o Adder.def Next I create a lib which can be imported in Visual C++: lib /machine:i386 /def:SingThing.def BUT...if I remove the flag -fvia-C, the program crashes when I run it:( I've tried experimenting with a few things: * Haskell FFI's calling conventions ccall/stdcall * Skipping the .def file * Skipping "lib /machine:i386 /def:SingThing.def", instead trying the approach descibed in: http://blogs.msdn.com/b/satnam_singh/archive/2011/04/19/creating-a-windows-d... Can anyone please give me a hint of whats going on? I guess it must be somthing with pointers and calling conventions, but I'm banging my head against the wall now:( Cheers Klas (Btw... I should mention that the simple Adder.hs example actually works without -fvia-C, my dll is more advanced, but I'm following the same compiling procedure) -- View this message in context: http://haskell.1045720.n5.nabble.com/Problems-creating-Haskell-dll-without-f... Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.
participants (1)
-
KlasI