Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1
    Join Date
    Jul 2004
    Location
    USA
    Posts
    820

    #include <windows.h>

    ok so iam following along with the vtm and i get the error:

    fatal error C1083: Cannot open include file: 'windows.h': No such file or directory

    its linked up fine add winmm.lib, and yes iam runing windows.

    Thanks alot
    -Huntere45

  2. #2
    Join Date
    Dec 2002
    Location
    Scotland
    Posts
    1,425

    Re: #include <windows.h>

    Originally posted by Huntere45
    ok so iam following along with the vtm and i get the error:

    fatal error C1083: Cannot open include file: 'windows.h': No such file or directory

    its linked up fine add winmm.lib, and yes iam runing windows.

    Thanks alot
    -Huntere45
    I am sure i read somewhere that this was a problem for .net 2005, is that what you are using? There is an SDK you have to download from microsoft.

    edit, yea check out here

  3. #3
    Join Date
    Jul 2004
    Location
    USA
    Posts
    820
    ok cool got to download them. thank you.

  4. #4
    Join Date
    Jul 2004
    Location
    USA
    Posts
    820
    Ok i got it installed fine but its still bringing up that error. Any ideas?

  5. #5
    Join Date
    Dec 2002
    Location
    Scotland
    Posts
    1,425
    Originally posted by Huntere45
    Ok i got it installed fine but its still bringing up that error. Any ideas?
    there is another thread a couple of threads down called "windows.h problem" so this is take from there:

    Originally posted by ostamo2
    you have to set up the compiler to find the new lib and new includes directory


    Step 1. Install Visual C++ 2005 Express.
    If you haven't done so, install Visual C++ 2005 Express by following the instructions here.

    Step 2. Install the Microsoft Platform SDK.
    You can install the Platform SDK over the Web from the Platform SDK Update site. On that page click Download and then make sure to choose Windows SDK and then Core SDK from the list.

    Step 3. Update the the Visual C++ Directories in the Projects and Solutions section in the Options dialog box.
    In that section, you'll want to add the paths to the appropriate subsection:

    Executable files - C:\Program Files\Microsoft SDK\Bin
    Include files - C:\Program Files\Microsoft SDK\include
    Library files - C:\Program Files\Microsoft SDK\lib
    Step 4. Update the corewin_express.vsprops file.
    You just need to take one more step to make the Win32 template work in express. You need to edit the corewin_express.vsprops file (found in C:\Program Files\Microsoft Visual Studio 8\VC\VCProjectDefaults) and change the string that reads:

    AdditionalDependencies="kernel32.lib"

    to

    AdditionalDependencies="kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib"

    Step 5. Generate and build a Win32 application to test your paths.
    From the File menu, click New Project. In the New Project dialog box, expand the Visual C++ node in the Product Types tree and then click Win32. Click on the Win32 Template and then give your project a name and click OK. In the Win32 Application Wizard dialog box, make sure that Windows application is selected as the Application type and the ATL is not selected. Click the Finish button to generate the project.

    As a final step, you should test your project by clicking the Start button in the IDE or by pressing F5. Your Win32 application should build and run.

  6. #6
    Join Date
    Jul 2004
    Location
    USA
    Posts
    820
    Thanks you once agian... lol but at first it wasent working because i had an extra "....

  7. #7
    Join Date
    Jul 2004
    Posts
    35
    Hi Huntere45,

    Since you can use now the windows.h, perhaps you can help me.
    I am stuck in step 3, I can't find the options dialog box in project and solution section so that I can add the path for executable, include and library files.

    Any help will be appreciated.

  8. #8
    Join Date
    Jul 2004
    Location
    USA
    Posts
    820
    Originally posted by wave3d
    Hi Huntere45,

    Since you can use now the windows.h, perhaps you can help me.
    I am stuck in step 3, I can't find the options dialog box in project and solution section so that I can add the path for executable, include and library files.

    Any help will be appreciated.
    Tools > options > project and solutions > VC++ Directories

    have fun and learn learn learn.

  9. #9
    Join Date
    Jul 2004
    Posts
    35
    Thanks for your help.

  10. #10
    Join Date
    May 2003
    Location
    Derby England
    Posts
    1,005
    A big big thank you from me too

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •