Thread: windows.h for mac?

  1. #1
    Registered User
    Join Date
    Jul 2007
    Location
    Texas
    Posts
    103

    windows.h for mac?

    Is there a way to get the windows.h file on a mac? or is there an identical file for mac? if you know the answer please help or know some way to do what I am trying to... or just any info please help.... thanks

  2. #2
    Registered User
    Join Date
    May 2005
    Posts
    22
    Um, no. Mac and Windows are two very different operating systems. windows.h is for Windows programming, not Mac or any other *nix OS. I assume you're trying to get a program running on Mac OS X that uses the Win32 API?

  3. #3
    Registered User
    Join Date
    Jul 2007
    Location
    Texas
    Posts
    103
    no I am not very like good at C I can do a lot of simple programming, but I just want to use some of the functions included with it.. such as the sleep function..

  4. #4
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    Then use sleep() from unistd.h

    It's in seconds, whereas Win32 Sleep() is in milliseconds.

  5. #5
    Registered User
    Join Date
    Jul 2007
    Location
    Texas
    Posts
    103

    well what if

    well what if I want to use other functions in windows.h do I just have to find out where they are. And is there is big database type thing for that unistd.h, like there is for msdn... like for all basic mas/ Unix headers?

  6. #6
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,612
    Yes.

  7. #7
    Registered User
    Join Date
    Jul 2007
    Location
    Texas
    Posts
    103
    well... what is it lol and why is ur font red?

  8. #8
    Internet Superhero
    Join Date
    Sep 2006
    Location
    Denmark
    Posts
    964
    Quote Originally Posted by alexnb185 View Post
    well... what is it lol and why is ur font red?
    Here's a hint:

    Click it.....

  9. #9
    Registered User
    Join Date
    Jul 2007
    Location
    Texas
    Posts
    103
    that was a good hint

  10. #10
    Registered User
    Join Date
    Oct 2007
    Posts
    242
    Lol
    Hmm...what's the function for linux-ubuntu?

  11. #11
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by eXeCuTeR View Post
    Lol
    Hmm...what's the function for linux-ubuntu?
    WHICH function?

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  12. #12
    Registered User
    Join Date
    Oct 2007
    Posts
    242
    Quote Originally Posted by matsp View Post
    WHICH function?

    --
    Mats
    The window's sleep function.
    What function in linux parallels to the window's one?
    Last edited by eXeCuTeR; 11-22-2007 at 03:35 AM.

  13. #13
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    sleep() is the Linux/Unix function. The function in Windows is Sleep().

    If you want a shorter sleep time than a second, use "usleep()" in Linux, it takes a time in microseconds. There's also a nanosleep, but that's essentially teh same as usleep internally, and just 3 digits longer number, but no better actual precision - if your process goes to sleep, it will sleep for more than a few nanoseconds, that's guaranteed.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  14. #14
    Registered User
    Join Date
    Oct 2007
    Posts
    242
    Sweet, thanks!

  15. #15
    Registered User
    Join Date
    Jul 2007
    Location
    Texas
    Posts
    103
    well I couldn't get the windows.h header file so that was why I was asking..

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problems reading windows.h
    By yaya in forum Windows Programming
    Replies: 7
    Last Post: 05-22-2009, 02:33 PM
  2. windows.h no such file or directory
    By FingerPrint in forum Tech Board
    Replies: 11
    Last Post: 08-26-2006, 09:51 PM
  3. Windows.h help
    By Mustang5670 in forum C Programming
    Replies: 3
    Last Post: 01-02-2004, 11:59 AM
  4. UNICODE and windows.h help
    By nextus in forum Windows Programming
    Replies: 3
    Last Post: 03-02-2003, 03:13 PM
  5. windows.h without the mouse support
    By ()Q() in forum C++ Programming
    Replies: 1
    Last Post: 07-12-2002, 07:57 PM