include modules in DLL? "undefined reference"

Hello! I'm trying to compile a Windows DLL and need to include an additional module (specifically FRP.Yampa). I was successful with a Hello World type of DLL but when I use Yampa I get: $ ghc -shared -o hs.dll DLLTest.o DLLTest_stub.o StartEnd.o Creating library file: hs.dll.a DLLTest.o:fake:(.text+0x46): undefined reference to `Yampazm0zi9zi2zi3_FRPziYamp a_integral_closure' DLLTest.o:fake:(.text+0x4d): undefined reference to `Yampazm0zi9zi2zi3_FRPziYamp aziVectorSpace_zdfVectorSpaceDoubleDouble_closure' DLLTest.o:fake:(.text+0x194): undefined reference to `Yampazm0zi9zi2zi3_FRPziYam pa_embed_closure' DLLTest.o:fake:(.text+0x381): undefined reference to `__stginit_Yampazm0zi9zi2zi 3_FRPziYampa_' DLLTest.o:fake:(.data+0x0): undefined reference to `Yampazm0zi9zi2zi3_FRPziYampa _integral_closure' DLLTest.o:fake:(.data+0x4): undefined reference to `Yampazm0zi9zi2zi3_FRPziYampa ziVectorSpace_zdfVectorSpaceDoubleDouble_closure' DLLTest.o:fake:(.data+0x38): undefined reference to `Yampazm0zi9zi2zi3_FRPziYamp a_embed_closure' collect2: ld returned 1 exit status How can I define the references of Yampa in the DLL? I also tried to reinstall Yampa shared with: $ cabal install --reinstall --enable-shared yampa Could not find module `Data.IORef': Perhaps you haven't installed the "dyn" libraries for package `base-3.0.3. 2'? Use -v to see a list of the files searched for. $ cabal install --reinstall --enable-shared base # :) Resolving dependencies... cabal: internal error: impossible ---- (StartEnd is taken from: http://www.haskell.org/ghc//docs/latest/html/users_guide/win32-dlls.html ) DLLTest.hs: {-# LANGUAGE ForeignFunctionInterface, Arrows #-} module DLLTest embeddedSF :: Double -> Double -> Double -> IO Double embeddedSF v0 v1 v2 = return . last $ embed integral (v0, [(1.0, Just v1), (1.0, Just v2)]) foreign export ccall embeddedSF :: Double -> Double -> Double -> IO Double
participants (1)
-
Gerold Meisinger