On Fri, 2007-12-21 at 00:11 -0600, Spencer Janssen wrote:
> On Thursday 20 December 2007 22:04:13 Duncan Coutts wrote:
> > On Thu, 2007-12-20 at 21:16 -0600, Spencer Janssen wrote:
> > > If you're using Cabal, something like this should work:
> > >
> > > if os(win32)
> > > cpp-options:
On Thursday 20 December 2007 22:04:13 Duncan Coutts wrote:
> On Thu, 2007-12-20 at 21:16 -0600, Spencer Janssen wrote:
> > If you're using Cabal, something like this should work:
> >
> > if os(win32)
> > cpp-options: -DWIN32
>
> To be precise:
>
> if os(windows)
> cpp-option
On Thu, 2007-12-20 at 21:16 -0600, Spencer Janssen wrote:
> If you're using Cabal, something like this should work:
>
> if os(win32)
> cpp-options: -DWIN32
To be precise:
if os(windows)
cpp-options: -DWIN32
See, Cabal is (mostly) Neil "I hate mingw" Mitchell compliant.
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
>
> Do
Neil Mitchell wrote:
> Hi Jim
>
>
>
> #if defined(mingw32_HOST_OS) || defined(__MINGW32__)
>
>
Thanks Neil,
Jim
>
>
>
> If you want to test for Windows you have to ask whether an unrelated
> system is installed on your machine. Even if it isn't, you still have
> to test this value. This is w
Hi Jim
> 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 s
d there be something
predefined?
Thanks,
--
View this message in context:
http://www.nabble.com/How-to-use--ifdef-WIN32-tp14448173p14448173.html
Sent from the Haskell - Glasgow-haskell-users mailing list archive at
Nabble.com.
___
Glasgow-haskell-users