[Haskell-cafe] Win32 help please

John Ky newhoggy at gmail.com
Sun Feb 4 06:42:23 EST 2007


I'm interested in writing accessing some Win32 functions not available from

I wrote this short little file and tried to compile:

> module MyWin32 where
> #include <windows.h>

Then tried to compile it like this:

# hsc2hs mywin32.hsc
# ghc -fffi mywin32.hs
C:/system/ghc/ghc-6.6/libHSrts.a(Main.o):Main.c:(.text+0x1b): undefined
reference to `__stginit_ZCMain'
C:/system/ghc/ghc-6.6/libHSrts.a(Main.o):Main.c:(.text+0x3f): undefined
reference to `ZCMain_main_closure'
collect2: ld returned 1 exit status

What am I missing?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20070204/7f7a8cdb/attachment.htm

More information about the Haskell-Cafe mailing list