
I'm trying to build some haskell code as a .so/.dll so that it can ultimately be used by msvc. I have it working when I compile by hand (listed below) but I can't get the exact same thing built/linked with cabal. On linux everything builds fine, but when I try to link the resulting .so file, I get an error about a missing '__stginit_CInterface' reference. Indeed I couldn't find that name in any of the cabal-generated .dyn_o files. I checked the output of 'cabal build -v' and it seems to be executing about the same thing that I'm executing manually so I'm not sure what could be going wrong. On windows cabal won't even configure since '--enable-shared' seems to imply '-dynamic' (right?), and that's not currently supported.
Okay after some help from Duncan on #haskell, the problem seems pretty straightforward. I've uploaded the details here: http://hackage.haskell.org/trac/ghc/ticket/3252#comment:4 Cheers.