![]() |
| | #1 |
| Codigious Join Date: Mar 2006
Posts: 60
| windows.h no such file or directory here is the error message: Code: fatal error C1083: Cannot open include file: 'windows.h': No such file or directory Code: #include <iostream> #include <windows.h>
__________________ Code: /* ------------------------------------------------------------------*/
// INSERT CODE HERE
/* ------------------------------------------------------------------*/
Last edited by FingerPrint; 08-21-2006 at 04:46 AM. |
| FingerPrint is offline | |
| | #2 |
| Registered User Join Date: Aug 2005
Posts: 1,265
| did you follow all the installation steps ? |
| Ancient Dragon is offline | |
| | #3 |
| Codigious Join Date: Mar 2006
Posts: 60
| I didn't see step 5 the first time through(I was in a hurry and didnt scroll down that far). Anyways, I commented out the for lines that it says t comment out. Then it says: Code: 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 Console Application 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. Code: In the Win32 Application Wizard dialog box, make sure that Windows application is selected as the Application type /* On this part it wont let me select windows application. Only console application. */
__________________ Code: /* ------------------------------------------------------------------*/
// INSERT CODE HERE
/* ------------------------------------------------------------------*/
|
| FingerPrint is offline | |
| | #4 |
| (?<!re)tired Join Date: May 2006 Location: Portugal
Posts: 5,617
| If you were in a hurry then, double check now if you have the needed paths on the include list.
__________________ Originally Posted by brewbuck: Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster. |
| Mario F. is offline | |
| | #5 |
| Codigious Join Date: Mar 2006
Posts: 60
| Well, I'm glad you said that mario. I did add the paths I was supposed to add, but I added all 3 of them into the executables. I fixed that part. But I still got the error when I ran my program, and I still cant make a windows app. I still can only make a console app. I also just noticed another thing. On the page Ancient Dragon pointed out says to comment out lines 441-444 Code: // WIN_APP.disabled = true; // WIN_APP_LABEL.disabled = true; // DLL_APP.disabled = true; // DLL_APP_LABEL.disabled = true; in C:\Program Files\Microsoft Visual Studio 8\VC\VCWizards\AppWiz\Generic\Application\html\103 3. I went there, opened the file in Notepad(it mentioned opening it in a text editor) and looked for the 4 lines. Well, I only found these 3 lines. Code: // WIN_APP.disabled = true; // DLL_APP.disabled = true; // LIB_APP.disabled = true; EDIT: Ok cool. I found the 4 lines. I didnt notice them the first few searches. But I just found them and commented them out. Its working a'ok now. RE-EDIT!: Bah! Ok, I thought it was working but unfortunately it isnt. I can now make windows apps and dll's. Yet it still says that there is no winows.h. I just dont get it, ive done all the install steps. All the other headers work just fine. I dont know what else to do from here. It works just fine in Dev C++. Is there some stupidly obvious lib im supposed to add or something?
__________________ Code: /* ------------------------------------------------------------------*/
// INSERT CODE HERE
/* ------------------------------------------------------------------*/
Last edited by FingerPrint; 08-24-2006 at 04:43 PM. |
| FingerPrint is offline | |
| | #6 |
| Codigious Join Date: Mar 2006
Posts: 60
| Well, I did a google search and it seems a ton of people are having this problem. Ill keep working at it but I think I might as well go back to Dev C++ or find some other compiler. Thanks for the help though.
__________________ Code: /* ------------------------------------------------------------------*/
// INSERT CODE HERE
/* ------------------------------------------------------------------*/
|
| FingerPrint is offline | |
| | #7 |
| Registered User Join Date: Aug 2006
Posts: 61
| Allright, I think I figured out the problem; It is with microsoft's website itself; The paths that they provide are inaccurate; It says: Code: Step 3: Update the Visual C++ directories in the Projects and Solutions section in the Options dialog box. Add the paths to the appropriate subsection: Executable files: C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Bin Include files: C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include Library files: C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib Code: Step 3: Update the Visual C++ directories in the Projects and Solutions section in the Options dialog box. Add the paths to the appropriate subsection: Executable files: C:\Program Files\Microsoft Platform SDK\Bin Include files: C:\Program Files\Microsoft Platform SDK\Include Library files: C:\Program Files\Microsoft Platform SDK\Lib |
| mkylman is offline | |
| | #8 |
| Registered User Join Date: Aug 2006
Posts: 61
| The #include <windows.h> not working problem...SOLVED! Okay, I have noticed a lot of people having this problem(myself included), on this board, and all accross google; I think that I have discovered the error though; The error is with microsoft's "using platform sdk with visual c++" instruction page, which is located at http://msdn.microsoft.com/vstudio/ex...k/default.aspx; The paths that they provide are inaccurate; It says: Code: Step 3: Update the Visual C++ directories in the Projects and Solutions section in the Options dialog box. Add the paths to the appropriate subsection: Executable files: C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Bin Include files: C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include Library files: C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib Code: Step 3: Update the Visual C++ directories in the Projects and Solutions section in the Options dialog box. Add the paths to the appropriate subsection: Executable files: C:\Program Files\Microsoft Platform SDK\Bin Include files: C:\Program Files\Microsoft Platform SDK\Include Library files: C:\Program Files\Microsoft Platform SDK\Lib |
| mkylman is offline | |
| | #9 |
| C++ Witch Join Date: Oct 2003 Location: Singapore
Posts: 11,275
| Interesting. I installed Platform SDK, and the correct path is what is given by Microsoft's directions. Which version of the PSDK did you download and install?
__________________ C + C++ Compiler: MinGW port of GCC Build + Version Control System: SCons + Bazaar Look up a C/C++ Reference and learn How To Ask Questions The Smart Way |
| laserlight is offline | |
| | #10 | |
| Registered User Join Date: Aug 2006
Posts: 61
| Quote:
| |
| mkylman is offline | |
| | #11 | |
| C++ Witch Join Date: Oct 2003 Location: Singapore
Posts: 11,275
| Quote:
__________________ C + C++ Compiler: MinGW port of GCC Build + Version Control System: SCons + Bazaar Look up a C/C++ Reference and learn How To Ask Questions The Smart Way | |
| laserlight is offline | |
| | #12 |
| Registered User Join Date: Aug 2006
Posts: 61
| Ah...Oh, well then I should prolly see about deleting this thread... God, I feel a little dumb now...Lol; |
| mkylman is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| File Writing Problem | polskash | C Programming | 3 | 02-13-2009 10:47 AM |
| Inventory records | jsbeckton | C Programming | 23 | 06-28-2007 04:14 AM |
| airport Log program using 3D linked List : problem reading from file | gemini_shooter | C Programming | 3 | 03-04-2005 02:46 PM |
| archive format | Nor | A Brief History of Cprogramming.com | 0 | 08-05-2003 07:01 PM |
| Need a suggestion on a school project.. | Screwz Luse | C Programming | 5 | 11-27-2001 02:58 AM |