Template Haskell compilation error on Windows (was Re: speed: ghc vs gcc)

I tried to compile the template Haskell loop unrolling trick from Claus Reinke on my machine which is running Windows and GHC 6.10.1, and I got linker errors. (note that compiling *without* -fvia-C works fine) Compiling under Cygwin did not solve it. Any ideas how I could get this working? I have no experience with TH yet so I might be missing something essential... Thanks, Peter c:\temp>ghc -O2 -fvia-C -optc-O3 -fforce-recomp Apply.hs Apply.o:ghc6140_0.hc:(.text+0x7d): undefined reference to `templatezmhaskell_LanguageziHaskellziTHziSyntax_VarP_con_info' Apply.o:ghc6140_0.hc:(.text+0x10d): undefined reference to `templatezmhaskell_LanguageziHaskellziTHziSyntax_VarE_con_info' Apply.o:ghc6140_0.hc:(.text+0x19d): undefined reference to `templatezmhaskell_LanguageziHaskellziTHziSyntax_VarP_con_info' Apply.o:ghc6140_0.hc:(.text+0x571): undefined reference to `templatezmhaskell_LanguageziHaskellziTHziSyntax_VarP_con_info' Apply.o:ghc6140_0.hc:(.text+0x609): undefined reference to `templatezmhaskell_LanguageziHaskellziTHziSyntax_VarE_con_info' Apply.o:ghc6140_0.hc:(.text+0x6c9): undefined reference to `templatezmhaskell_LanguageziHaskellziTHziSyntax_VarE_con_info' Apply.o:ghc6140_0.hc:(.text+0x789): undefined reference to `templatezmhaskell_LanguageziHaskellziTHziSyntax_VarE_con_info' Apply.o:ghc6140_0.hc:(.text+0x82c): undefined reference to `templatezmhaskell_LanguageziHaskellziTHziLib_a23_closure' Apply.o:ghc6140_0.hc:(.text+0x868): undefined reference to `templatezmhaskell_LanguageziHaskellziTHziLib_a23_closure' Apply.o:ghc6140_0.hc:(.text+0x891): undefined reference to `templatezmhaskell_LanguageziHaskellziTHziSyntax_VarP_con_info' Apply.o:ghc6140_0.hc:(.text+0xd81): undefined reference to `templatezmhaskell_LanguageziHaskellziTHziSyntax_VarP_con_info' Apply.o:ghc6140_0.hc:(.text+0xe19): undefined reference to `templatezmhaskell_LanguageziHaskellziTHziSyntax_VarE_con_info' Apply.o:ghc6140_0.hc:(.text+0xed9): undefined reference to `templatezmhaskell_LanguageziHaskellziTHziSyntax_VarE_con_info' Apply.o:ghc6140_0.hc:(.text+0xf99): undefined reference to `templatezmhaskell_LanguageziHaskellziTHziSyntax_VarE_con_info' Apply.o:ghc6140_0.hc:(.text+0x103c): undefined reference to `templatezmhaskell_LanguageziHaskellziTHziLib_a23_closure' Apply.o:ghc6140_0.hc:(.text+0x1078): undefined reference to `templatezmhaskell_LanguageziHaskellziTHziLib_a23_closure' Apply.o:ghc6140_0.hc:(.text+0x10a1): undefined reference to `templatezmhaskell_LanguageziHaskellziTHziSyntax_VarP_con_info' Apply.o:ghc6140_0.hc:(.text+0x14d0): undefined reference to `__stginit_templatezmhaskell_LanguageziHaskellziTHziSyntax_' Apply.o:ghc6140_0.hc:(.text+0x292): undefined reference to `templatezmhaskell_LanguageziHaskellziTHziLib_lamE_info' Apply.o:ghc6140_0.hc:(.text+0x6ab): undefined reference to `templatezmhaskell_LanguageziHaskellziTHziLib_a23_info' Apply.o:ghc6140_0.hc:(.text+0x76b): undefined reference to `templatezmhaskell_LanguageziHaskellziTHziLib_a23_info' Apply.o:ghc6140_0.hc:(.text+0x9bc): undefined reference to `templatezmhaskell_LanguageziHaskellziTHziLib_lamE_info' Apply.o:ghc6140_0.hc:(.text+0xebb): undefined reference to `templatezmhaskell_LanguageziHaskellziTHziLib_a23_info' Apply.o:ghc6140_0.hc:(.text+0xf7b): undefined reference to `templatezmhaskell_LanguageziHaskellziTHziLib_a23_info' Apply.o:ghc6140_0.hc:(.text+0x11cc): undefined reference to `templatezmhaskell_LanguageziHaskellziTHziLib_lamE_info' C:\app\ghc-6.10.1/libHSrts.a(Main.o):Main.c:(.text+0x7): undefined reference to `__stginit_ZCMain' C:\app\ghc-6.10.1/libHSrts.a(Main.o):Main.c:(.text+0x36): undefined reference to `ZCMain_main_closure' collect2: ld returned 1 exit status

Missing --make bugfact:
I tried to compile the template Haskell loop unrolling trick from Claus Reinke on my machine which is running Windows and GHC 6.10.1, and I got linker errors.
c:\temp>ghc -O2 -fvia-C -optc-O3 -fforce-recomp Apply.hs Apply.o:ghc6140_0.hc:(.text+0x7d): undefined reference to

I JUST FOUND OUT...SILLY MEEEEE!!! ;-)
On Sun, Feb 22, 2009 at 1:13 AM, Don Stewart
Missing --make
bugfact:
I tried to compile the template Haskell loop unrolling trick from Claus Reinke on my machine which is running Windows and GHC 6.10.1, and I got linker errors.
c:\temp>ghc -O2 -fvia-C -optc-O3 -fforce-recomp Apply.hs Apply.o:ghc6140_0.hc:(.text+0x7d): undefined reference to
participants (2)
-
Don Stewart
-
Peter Verswyvelen