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?
Console API Functions
Started by dargueta, Oct 14 2007 03:16 PM
14 replies to this topic
#1
Posted 14 October 2007 - 03:16 PM
|
|
|
#2
Posted 14 October 2007 - 03:58 PM
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
Visual Studio C/C++ Header,Include Files
#3
Posted 14 October 2007 - 04:56 PM
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...
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...
#4
Posted 15 October 2007 - 12:09 AM
#5
Posted 15 October 2007 - 05:22 PM
.NET is free, though. Thank you all, it works great now!
#6
Posted 17 October 2007 - 03:16 PM
#7
Posted 17 October 2007 - 03:18 PM
Ah, well. I already have VC++6 and now it works, but thanks anyway. Is there any real difference between VC++ and Dev-C++ ?
#8
Posted 17 October 2007 - 10:41 PM
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.
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.
#9
Posted 18 October 2007 - 04:54 AM
#10
Posted 19 October 2007 - 02:17 PM
What specifically, I mean? Anything to do with either 1)ease of making GUIs or 2)efficiency of produced programs?
#11
Posted 19 October 2007 - 03:38 PM
Dev-Cpp gives you more compiler options (exe labelling, info etc...) and more importantly, Dev-Cpp exe's are .NET Framework independant
#12
Posted 19 October 2007 - 04:58 PM
Visual C++ can build Win32 programs too (not only .Net)...
it has a way better compiler, and its interface is nicer and more productive (professional).
In debugging, I've never seen anything better than VC debugger.
But you must pay for it.
Dev is free, open source, crossplatform (although the VC code can be transported to another compiler -> compiling for another platform)...
VC has better optimizing settings...
Personally I prefer VC, as you may see.
it has a way better compiler, and its interface is nicer and more productive (professional).
In debugging, I've never seen anything better than VC debugger.
But you must pay for it.
Dev is free, open source, crossplatform (although the VC code can be transported to another compiler -> compiling for another platform)...
VC has better optimizing settings...
Personally I prefer VC, as you may see.


Sign In
Create Account

Back to top










