-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
When I tried to compile a Haskell package importing repa-devil on Windows it gave linking errors complaining about undefined references to IL functions such as:
Linking dist\build\test\test.exe ...
dist\build\shapes\test-tmp\Main.o:fake:(.text+0x71900): undefined reference to `ilInit'
dist\build\shapes\test-tmp\Main.o:fake:(.text+0x71910): undefined reference to `ilOriginFunc'
I was able to fix it by replacing all foreign import ccall calling conventions by stdcall, eg.
foreign import ccall unsafe "ilInit" ilInitC :: IO ()
by
foreign import stdcall unsafe "ilInit" ilInitC :: IO ()
After reinstalling such a modified repa-devil I can read and write PNG images etc.
This is my setup:
- Windows7 64 bit
- Haskell Platform (comes with MinGW)
- install MSys and MSysDTK as described in http://blog.johantibell.com/2011/01/setting-up-haskell-development.html
- install nasm using its Windows installer
- install zlib, libpng, libjpeg-turbo and then devil from source
A small Haskell program which triggers the error:
module Main where
import Data.Array.Repa.IO.DevIL
main = runIL $ do
(RGB im) <- readImage "blah.png"
return ()
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels