Re: How to access hs_free_fun_ptr from a Visual Studio DLL

2006-03-26 Thread Sven Panne
Am Samstag, 25. März 2006 20:00 schrieb Brian Hulley: I've found a workaround to the problem below: instead of trying to use hs_free_fun_ptr, I instead pass a FunPtr to the Haskell function freeHaskellFunPtr into my DLL, and use this to free everything, finally using it to free itself (!)

Re: Message GHC/PrimopWrappers.hs:133:29: Not in scope: `GHC.Prim.quotInteger2Exp#' building GHC with additional primitive operation

2006-03-26 Thread Thorkil Naur
On Thursday 23 March 2006 17:51, Simon Marlow wrote: I think you probably just haven't recompiled enough stuff after adding the primop. I can't tell immediately whether it's the compiler that is out of date, or an interface file in libraries/base. To be on the safe side, you could 'make

Still problems building ghc 6.5 with ghc 6.4

2006-03-26 Thread Michael Marte
Hello *, when building ghc 6.5 with ghc 6.4 and alex 2.0.1, the build fails as follows: make -C ghc/compiler stage=2 make[2]: Entering directory `/home/marte/fptools/ghc/compiler' ../../ghc/compiler/ghc-inplace -H16m -O -istage2/utils -istage2/basicTypes -istage2/types -istage2/hsSyn

Re: How to access hs_free_fun_ptr from a Visual Studio DLL

2006-03-26 Thread Brian Hulley
Sven Panne wrote: Am Samstag, 25. März 2006 20:00 schrieb Brian Hulley: I've found a workaround to the problem below: instead of trying to use hs_free_fun_ptr, I instead pass a FunPtr to the Haskell function freeHaskellFunPtr into my DLL, and use this to free everything, finally using it to

Re: How to access hs_free_fun_ptr from a Visual Studio DLL

2006-03-26 Thread Krasimir Angelov
Hi Brian, The problem is that hs_free_fun_ptr is defined in a static library (the Haskell RTS) while you have declared it with __declspec(dllimport). In this case the compiler is tring tp optimize the call and it is using __imp__hs_free_fun_ptr instead of hs_free_fun_ptr. You have to remove the