• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
jeffreyp23

Windows.h missing ?

11 posts in this topic

Hello all,

Today i decided to start programming with DirectX 11, so i downloaded the latest sdk(i had the one from february 2010)
and installed it. I opened an example project and tryed to compile it, but to my suprise i get a compiler error saying that windows.h cannot be found.
Before i installed the latest sdk everything was fine.

btw im using visual studio 2008.

thanks in advance
0

Share this post


Link to post
Share on other sites
[quote name='kiwibonga' timestamp='1302809816' post='4798524']
Are you by any chance #including "Windows.h" instead of <Windows.h> ?
[/quote]

Nope im including <Windows.h>
Mabye the installation messed up my settings?
Is it bad to have 3 different versions of the SDK installed?
Because i got the 2007, 2010(february) and 2010(june) versions.

Thanks
0

Share this post


Link to post
Share on other sites
Have you got the [url=http://msdn.microsoft.com/en-us/windows/bb980924.aspx]platform sdk[/url]?

Windows.h isn't included in Visual Studio express edition installations so that could be your problem (if you are using the express edition that is).

0

Share this post


Link to post
Share on other sites
[quote name='ExcessNeo' timestamp='1302823838' post='4798592']
Have you got the [url="http://msdn.microsoft.com/en-us/windows/bb980924.aspx"]platform sdk[/url]?

Windows.h isn't included in Visual Studio express edition installations so that could be your problem (if you are using the express edition that is).


[/quote]

I tryed to install the latest version of the platform SDK,
but it didnt solve my problem.

Edit : Im using the [size="2"]Visual Studio 2008 Professional Edition. [/size]
0

Share this post


Link to post
Share on other sites
[quote name='Jeffreyp' timestamp='1302808174' post='4798514']
but to my suprise i get a compiler error saying that windows.h cannot be found.
Before i installed the latest sdk everything was fine.
[/quote]

There are known issues with various versions of SDKs being used with various versions of IDEs where they stomp on each other's configured paths.

You can either modify the search paths to use whatever you expected, or download and install the latest Windows SDK, which should again update the search paths and include itself. I suggest you use the latest version of the SDK unless you have a compelling reason not to.
0

Share this post


Link to post
Share on other sites
[quote name='frob' timestamp='1302886358' post='4798827']
[quote name='Jeffreyp' timestamp='1302808174' post='4798514']
but to my suprise i get a compiler error saying that windows.h cannot be found.
Before i installed the latest sdk everything was fine.
[/quote]

There are known issues with various versions of SDKs being used with various versions of IDEs where they stomp on each other's configured paths.

You can either modify the search paths to use whatever you expected, or download and install the latest Windows SDK, which should again update the search paths and include itself. I suggest you use the latest version of the SDK unless you have a compelling reason not to.
[/quote]

I already got the latest Platform SDK / DirectX SDK, but im using Visual studio proff 2008.
So i have to switch to Visual studio 2010?

btw i tried a repair on visual studio 2008 and it didnt work.
0

Share this post


Link to post
Share on other sites
[quote name='Jeffreyp' timestamp='1302892740' post='4798861']
[quote name='frob' timestamp='1302886358' post='4798827']
[quote name='Jeffreyp' timestamp='1302808174' post='4798514']
but to my suprise i get a compiler error saying that windows.h cannot be found.
Before i installed the latest sdk everything was fine.
[/quote]

There are known issues with various versions of SDKs being used with various versions of IDEs where they stomp on each other's configured paths.

You can either modify the search paths to use whatever you expected, or download and install the latest Windows SDK, which should again update the search paths and include itself. I suggest you use the latest version of the SDK unless you have a compelling reason not to.
[/quote]

I already got the latest Platform SDK / DirectX SDK, but im using Visual studio proff 2008.
So i have to switch to Visual studio 2010?

btw i tried a repair on visual studio 2008 and it didnt work.
[/quote]

1.Are you absolutely positive that the <windows.h> file is in your hard drive and existing?

2.Are you sure that all libs, dlls and such related to <windows.h> are existing?

3.Did you check and see because some DirectX headers already include <windows.h> or maybe the compiling is confused by some related issue to that.

4.I can't really be the best judge because I don't use Visual Studio anymore... I use Code::Blocks, Bloodshed Dev, C++ mainly.

5.Is the windows.h file in the directory from which the preprocessor reads from? The file must be in the includes folder of your Visual Studio folder because that's where the #includes/header files and such are read from. Check and see if windows.h is there along with all of its other sub-headers, dlls and lib files.

Any slight error can make the compilation fail if the preprocessor can't find the file because it's misplaced or missing necessary things associated with it to function properly.

The externs, dlls and lib files must be working in full accordance with the main windows header file. If not, then it won't work. But the issue you seem to be having is likely due to the fact that the main windows header file is not in the include folder/directory where the preprocessor reads from.

Thus, "Cannot find <windows.h>. No such file exists.".

Also, not to sound too picky, but everything is case-sensitive. If you capitalize it then it may not work, but that's usually not the case.

Check all spelling to assure perfect syntax and everything in the #include for windows header file as well.
-1

Share this post


Link to post
Share on other sites
[quote]
1.Are you absolutely positive that the <windows.h> file is in your hard drive and existing?
[/quote]
Yes, because if i compile it with Dev-C++ it works fine.

[quote]
2.Are you sure that all libs, dlls and such related to <windows.h> are existing?
[/quote]
Yes, because they existed before too.

[quote]
3.Did you check and see because some DirectX headers already include <windows.h> or maybe the compiling is confused by some related issue to that.
[/quote]
When i try to compile a simple hello world program it gives the same error. So it isnt DirectX.

[quote]
4.I can't really be the best judge because I don't use Visual Studio anymore... I use Code::Blocks, Bloodshed Dev, C++ mainly.
[/quote]
On dev c++ it compiles fine.

[quote]
5.Is the windows.h file in the directory from which the preprocessor reads from? The file must be in the includes folder of your Visual Studio folder because that's where the #includes/header files and such are read from. Check and see if windows.h is there along with all of its other sub-headers, dlls and lib files.
[/quote]
No it isnt there. And after i see im missing alot more headers like <vector>.
So i already tried a repair but it didnt give me the headers back.
I guess its an issue with the compiler working with the SDK?
1

Share this post


Link to post
Share on other sites
[quote]
No it isnt there. And after i see im missing alot more headers like <vector>.
So i already tried a repair but it didnt give me the headers back.
I guess its an issue with the compiler working with the SDK?
[/quote]

If you're missing the header files then that pretty much explains exactly what the problem is.

That IDE didn't bring the header files? Trash it and get another one, specifically a newer one.

That should solve the case. Make sure you completely remove all of the files relating to your current IDE before downloading the newer one.

Try that and tell me how it goes.

But yes, it could also have to do with the compiler. Which one do you use?

All in all, getting a newer IDE or using a different one will solve your problem.

It obviously works on other IDEs because they contain the header files, libs and all other necessary files to run the Windows API.

The IDE you were failing to get it running on was missing the files.

Hence, use another IDE with all of the optimum Windows files for the Windows API language and environment because getting all the files together yourself, one by one, will be a pain and there will likely be countless errors.

Logic number one: If you want to use something and it doesn't exist then you can't use it.

Research and re-learn.
-1

Share this post


Link to post
Share on other sites
I uninstalled visual studio 2008 proffesional and
installed visual studio 2010 proffesional and the problem is solved.

Thanks everyone
0

Share this post


Link to post
Share on other sites
[quote name='Jeffreyp' timestamp='1302953286' post='4799103']
I uninstalled visual studio 2008 proffesional and
installed visual studio 2010 proffesional and the problem is solved.

Thanks ?? >> "[i][b]everyone"[/b] << ??[/i]
[/quote]

You're welcome! ;)
-2

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0