Lost Password?


Go Back   CodeCall Programming Forum > Software Development > C and C++

C and C++ C and C++ forum for discussing all forms of C except for C#. These languages are powerful low level languages used for creating Operating Systems, Device Drivers, compilers and much more.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-14-2007, 07:16 PM
dargueta dargueta is offline
Guru
 
Join Date: Oct 2007
Age: 18
Posts: 793
Last Blog:
Programs Under the Hoo...
Rep Power: 13
dargueta is a jewel in the roughdargueta is a jewel in the roughdargueta is a jewel in the roughdargueta is a jewel in the rough
Default Console API Functions

I'm writing a class that uses API functions such as ReadConsoleOutputCharacter and ReadConsoleOutputAttribute. However, my compiler (Visual V++ 2005) can't seem to find windows.h, where all of the functions are declared. When I did a file search on my computer, windows.h was nowhere to be found.
The error message was:

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

I tried working around this by linking to kernel32.dll using the #using preprocessor directive, but it failed, giving me this error:

fatal error C1113: #using failed on 'c:\windows\system32\kernel32.dll'

I check all of my include paths, and they're correct. Passing absolute pathnames didn't do anything, and apparently windows.h isn't even on my computer. Can someone please tell me how to fix the dll linking error or at least tell me where to get a copy of windows.h?

Last edited by dargueta; 10-14-2007 at 07:19 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 10-14-2007, 07:58 PM
Victor Victor is offline
Learning Programmer
 
Join Date: May 2007
Posts: 96
Rep Power: 6
Victor is on a distinguished road
Default

You can find windows.h with this link. You just have to put it in the right directory in your compiler's lib folder. Or just make an #include "windows.h"
Visual Studio C/C++ Header,Include Files
__________________
Pegasus Homepage
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 10-14-2007, 08:56 PM
davHunter davHunter is offline
Newbie
 
Join Date: Oct 2007
Posts: 8
Rep Power: 0
davHunter is on a distinguished road
Default

Visual C++ 2005 (at least the Express Edition) does not come with the Native Windows API.
For using windows.h, or any other windows (not .NET) include, you must download Windows Platform SDK first.
After you install it, you should be able to use all those functions.
But remember that you must put the necessary paths for it to work.
To do so, go to Tools > Options > Projects and Solutions > VC++ Directories and add the Platform SDK includes, libraries and binaries paths to the list (in the corresponding directory)....

The Windows Platform SDK can be downloaded from Microsoft page. Unfortunately I cannot post any links since it's my first message, so try looking on its search engine

That should work.
BTW, I'm not a native english-speaker, so forgive any mistakes...

Last edited by davHunter; 10-14-2007 at 09:49 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 10-15-2007, 04:09 AM
mindsurfer mindsurfer is offline
Learning Programmer
 
Join Date: Oct 2007
Posts: 40
Rep Power: 5
mindsurfer is on a distinguished road
Default

try using DevC++ or code blocks.. much better than .NET ****..lol
__________________
MindSurfer
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 10-15-2007, 09:22 PM
dargueta dargueta is offline
Guru
 
Join Date: Oct 2007
Age: 18
Posts: 793
Last Blog:
Programs Under the Hoo...
Rep Power: 13
dargueta is a jewel in the roughdargueta is a jewel in the roughdargueta is a jewel in the roughdargueta is a jewel in the rough
Default

.NET is free, though. Thank you all, it works great now!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #6 (permalink)  
Old 10-17-2007, 07:16 PM
Victor Victor is offline
Learning Programmer
 
Join Date: May 2007
Posts: 96
Rep Power: 6
Victor is on a distinguished road
Default

Dev-C++ is free as well
__________________
Pegasus Homepage
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 10-17-2007, 07:18 PM
dargueta dargueta is offline
Guru
 
Join Date: Oct 2007
Age: 18
Posts: 793
Last Blog:
Programs Under the Hoo...
Rep Power: 13
dargueta is a jewel in the roughdargueta is a jewel in the roughdargueta is a jewel in the roughdargueta is a jewel in the rough
Default

Ah, well. I already have VC++6 and now it works, but thanks anyway. Is there any real difference between VC++ and Dev-C++ ?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 10-18-2007, 02:41 AM
v0id's Avatar   
v0id v0id is offline
Retired
 
Join Date: Apr 2007
Location: Denmark
Posts: 2,654
Last Blog:
CherryPy(thon)
Rep Power: 29
v0id is a glorious beacon of lightv0id is a glorious beacon of lightv0id is a glorious beacon of lightv0id is a glorious beacon of lightv0id is a glorious beacon of lightv0id is a glorious beacon of light
Send a message via MSN to v0id
Default

Yes, there's. It's like saying, is there a difference between Internet Explorer and Firefox?

It's two completely different programs, which each have the same purpose; to serve the user with a nice layout, and integrated compiler options. If I've to come with two big differences, then it's: They use different compilers, and the layout of the programs are different.
__________________
05-03-2007 - 11-13-2008
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 10-18-2007, 08:54 AM
mindsurfer mindsurfer is offline
Learning Programmer
 
Join Date: Oct 2007
Posts: 40
Rep Power: 5
mindsurfer is on a distinguished road
Default

i prefer msvc++ 6.0 over devC++..
__________________
MindSurfer
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 10-19-2007, 06:17 PM
dargueta dargueta is offline
Guru
 
Join Date: Oct 2007
Age: 18
Posts: 793
Last Blog:
Programs Under the Hoo...
Rep Power: 13
dargueta is a jewel in the roughdargueta is a jewel in the roughdargueta is a jewel in the roughdargueta is a jewel in the rough
Default

What specifically, I mean? Anything to do with either 1)ease of making GUIs or 2)efficiency of produced programs?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Favorite Console smith Video Game Talk 9 08-07-2008 10:23 PM
Virtual Functions ???? Patrick C and C++ 1 10-07-2007 10:54 AM
How to make a Web console ? kresh7 Visual Basic Programming 8 09-26-2007 12:27 PM
Get and Set Functions Chan C# Programming 3 08-25-2006 12:44 PM
Console Applications Ronin Java Help 4 08-23-2006 08:24 PM


All times are GMT -5. The time now is 04:43 AM.

Contest Stats

WingedPanther ........ 2753.6
Xav ........ 2704
Brandon W ........ 1702.32
John ........ 1207.73
marwex89 ........ 1175.24
morefood2001 ........ 966.05
dcs ........ 655.75
Steve.L ........ 475.59
orjan ........ 418.58
Aereshaa ........ 383.54

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 100%


Complete - Celebrate!

Ads