On Thursday 20 December 2007 18:37:15 Jim Burton wrote: > I want to switch code on the OS but this always goes through to the #else > (on windows or elsewhere): > > {-# OPTIONS -cpp #-} > #ifdef WIN32 > main = putStrLn "hello windows" > #else > main = putStrLn "hello something else" > #endif > > Does this depend on a Makefile setting WIN32, or should there be something > predefined? > > Thanks,
If you're using Cabal, something like this should work: if os(win32) cpp-options: -DWIN32 Cheers, Spencer Janssen _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users