[Haskell-beginners] Creating an exe file

legajid legajid at free.fr
Wed Apr 21 16:33:09 EDT 2010


Hi,

After running interpreted programs, i want to create an exe file; in a 
first time, just for my local machine. Later shall i try to install on 
other machines ...
To do this, i wrote a batch file :

d:
cd d:\prog\lang\haskell
set shs=%1
ghc %shs% -o%shs:hs=exe%
del %shs:hs=hi%
del %shs:hs=o%
pause

where %1 is my hs file full path.

Example of a run :
D:\>cd d:\prog\lang\haskell
D:\PROG\lang\haskell>set shs=E:\didier\haskell\cases.hs
D:\PROG\lang\haskell>ghc E:\didier\haskell\cases.hs 
-oE:\didier\haskell\cases.exe
D:\PROG\lang\haskell>del E:\didier\haskell\cases.hi
D:\PROG\lang\haskell>del E:\didier\haskell\cases.o
D:\PROG\lang\haskell>pause
Appuyez sur une touche pour continuer...

It's ok with some modules i have to import, like
import Data.List
import Data.Maybe

But, when using wxhaskell, i get a lot of errors, although i include
import Graphics.UI.WXCore
import Graphics.UI.WX

here is a small list of errors :

E:\didier\haskell\graphe.o:fake:(.data+0x2f0): undefined reference to 
`wxcorezm0zi11zi1zi2_GraphicsziUIziWXCoreziDialogs_infoDialog_closure'
E:\didier\haskell\graphe.o:fake:(.data+0x300): undefined reference to 
`wxzm0zi11zi1zi2_GraphicsziUIziWXziDraw_zdf4_closure'
E:\didier\haskell\graphe.o:fake:(.data+0x314): undefined reference to 
`wxzm0zi11zi1zi2_GraphicsziUIziWXziDraw_zdf4_closure'

what should the correct ghc command line be, in order to get a 
successful compilation ?

Thanks for help,
Didier

Running ghc 6.10.4 on Windows XP SP2, with wxhaskell-0.11.1.2




More information about the Beginners mailing list