General Question Very basic compiler issue

cymrych

The Probe abides
Donator
Joined
Mar 10, 2010
Messages
138
Reaction score
0
Points
0
Location
Where there are dead guys to dig up
Hi all,

So, after modifying craft using vinka's custom dlls for years, I finally decided to try my hand at creating a custom dll for a vessel I'm working on. After some research, I downloaded and installed VC++2005 Express and Windows SDK for Server 2008.

Problem is, neither appears to contain windows.h, so my build fails. I've double and triple-checked my Include pathways, but no dice; it ain't on my machine. Specifically, I receive this error message:

1>c:\users\user\desktop\orbiter10\orbitersdk\include\OrbiterAPI.h(26) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory

I scoured the web, and saw reference to a workaround but all the links seem dead by now. The only other real advice I saw (to people with my same problem, none of whom posted any later than about 2007 lol) was to install the newest Platform SDK ... the "newest" of which I saw must of been from 2004.

Any advice?

And please, use tiny words with me here! My knowledge of programming and its technical jargon is very, very limited thus far. I'm a fly-boy at heart; this programming venture is to me a necessary evil, I mean a necessary step in the process, to get my craft flying the way it ought to be flying.

Cheers, and may the Probe be with you if you manage to offer suggestions I can wrap my brain around!
 
The file should be in Include subdirectory of the folder where you installed the Windows SDK for Server 2008.

Probably environment variables with paths to include and library folders weren't set properly during installation, and you need to edit them manually in System properties. There should be also "SetEnv.cmd" batch file in the SDK folder, that should set those paths too.

There should be at least INCLUDE and LIB environment variables set, either for user or system. INCLUDE variable should include "<path to MS SDK>\Include", LIB variable should include "<path to MS SDK>\Lib". Any additional include or library directory needs to be delimited with semicolon (";"), like for PATH variable. If there isn't, you can set also "MSSdk" environment variable pointing to the installation folder of the Windows SDK.

You can check if those paths are set, by running command prompt (cmd.exe) and executing "set include" and "set lib" commands. If they are set, those variables won't be empty, and will contain paths to the Windows SDK.
 
Thanks Orb, I think I found my issues. Seems I neglected to hit "Apply" when I made my environent changes, so I guess everything reverted back to an empty line when I exited out of the Properties page. I can generally B-S my way through just about anything computer related, but it's always the "idiot factor" that causes me problems!

Are these environmental variables something I'll have to set for each project I begin? I have them pretty well memorized now, so no worries if that's the case. I'm just kinda curious.

By the way, I attempted to utilize the Command Line as you suggsted, but as I discovered, it doesn't seem to operate like the old DOS prompt from way back when. For instance, VC++'s Help told me to change to the \bin directory of the VC++ installation to run the batch file, but for the life of me I couldn't find a way to do so. How would I perform those "set include" and "set lib" commands?
 
Are these environmental variables something I'll have to set for each project I begin? I have them pretty well memorized now, so no worries if that's the case. I'm just kinda curious.
If you set those paths either as system environment variables (INCLUDE and LIB set in system properties), or as VC++ path settings (in "Tools -> Options -> Projects and Solutions -> VC++ Directories"), you don't need to set them for each project separately. You will only need to add additional include and library paths to projects if they are needed.


By the way, I attempted to utilize the Command Line as you suggsted, but as I discovered, it doesn't seem to operate like the old DOS prompt from way back when. For instance, VC++'s Help told me to change to the \bin directory of the VC++ installation to run the batch file, but for the life of me I couldn't find a way to do so.
Most of the commands are like in the old DOS days, so typing for example 'D:' changes drive to D:, 'DIR' lists contents of directory, and 'CD "<path to SDK>\bin"' would change active directory to the SDK's "bin" folder (you add double quotes if you have spaces in directory or file names).


How would I perform those "set include" and "set lib" commands?
The "set include" and "set lib" would be used to display only INCLUDE and LIB variables on the console. To perform them you open "Command Prompt" or run "cmd.exe", and when something like "DOS" window (text console) appear you type:
Code:
set include
set lib
If variables are defined it will respond like:
Code:
C:\some directory> [i][b]set include[/b][/i]
INCLUDE=C:\path to some SDK's include directory;D:\path to another SDK's include directory

C:\some directory> [i][b]set lib[/b][/i]
LIB=C:\path to some SDK's lib directory;D:\path to another SDK's lib directory
Note that there can be more than one path delimited by semicolon. Otherwise if it's empty it will tell that environment variable is undefined. You can exit the console window by typing "exit" command.
 
Back
Top