
On 10/18/06, Cyril Schmidt
I am using hs-plugins to load some Haskell modules dynamically. It all goes well until I try to load a module that uses a package with some C++ code in the implementation.
The module in question, A.hs, uses a package named RGPack, which consists of some C++ code and a single Haskell module that provides the necessary `foreign import' declarations. The package (including the C++ code) is built by GHC.
When I try to load A.hs using hs-plugins, I get the following error: Unknown PEi386 section name `.ctors' (while processing: C:\Program Files\Haskell\RGPack-0.0\ghc-6.4.2/HSRGPack-0.0.o)
I think this is fixed in ghc 6.6. There probably isn't a workaround without recompiling ghc from source (and fixing Linker.c in rts-dir.) Best regards, --Esa