Thread: #include <windows.h> not working...

  1. #1
    Registered User
    Join Date
    Aug 2006

    Unhappy #include <windows.h> not working...

    I am trying out some of the more advanced tutorials, which are way over my head; There's probably the first sign of a problem right there ;-) But anyway, I gave up on that, and then downloaded the source code for the calculator program; I opened up microsoft visual c++ 2005 express, and then opened up the project file that came with the source code I downloaded; I hit ctrl+shift+b to build/compile the project and it returned an error to me, saying that it couldn't use "windows.h" because there was no such file in the directory;

    Here is what it says in the output window(this is the error message)

    ------ Build started: Project: Calc, Configuration: Debug Win32 ------
    c:\documents and settings\mike\desktop\calc\global.h(5) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
    Build log was saved at "file://c:\Documents and Settings\Mike\Desktop\Calc\Debug\BuildLog.htm"
    Calc - 1 error(s), 0 warning(s)
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

    What does this mean exactly? Does anyone else have this problem? Does anyone know how to fix this problem? Thanks in advance;

  2. #2
    Registered User
    Join Date
    Nov 2005
    are you including it like
    #include "windows.h"
    cause that would be wrong
    #include <windows.h>
    would be the correct way, if that isnt the problem I don not know , but according to teh errors that looks like what it is

  3. #3
    carry on JaWiB's Avatar
    Join Date
    Feb 2003
    Seattle, WA
    You need to follow these instructions:
    "Think not but that I know these things; or think
    I know them not: not therefore am I short
    Of knowing what I ought."
    -John Milton, Paradise Regained (1671)

    "Work hard and it might happen."

  4. #4
    Registered User
    Join Date
    Aug 2006
    oh, I didn't know this had to do with compiler configuration...I'm sorry :-(

  5. #5
    Registered User
    Join Date
    Aug 2006
    Thanks guys! Oh, Raigne, I am using it inside the < > brackets, that's just how the output looked...And thanks Jawib, I'll definitely look there

  6. #6
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    There are a lot of threads, one has been merged and this one is closed.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. #include <string> not working?
    By bulletbutter in forum C++ Programming
    Replies: 7
    Last Post: 04-26-2008, 12:46 AM
  2. VC++ release exe exits immediately after execution
    By nocturna_gr in forum Windows Programming
    Replies: 6
    Last Post: 02-09-2008, 04:26 AM
  3. Errore opening the include <windows.h>
    By rasheed in forum Windows Programming
    Replies: 5
    Last Post: 05-21-2006, 11:23 PM
  4. Headers that use each other
    By nickname_changed in forum C++ Programming
    Replies: 7
    Last Post: 10-03-2003, 04:25 AM
  5. #includes don't seem to be working
    By Inquirer in forum C++ Programming
    Replies: 12
    Last Post: 08-05-2002, 05:38 PM
Website Security Test