Pelles C forum

C language => Beginner questions => Topic started by: MT on May 29, 2008, 09:57:59 PM

Title: opening windows.h
Post by: MT on May 29, 2008, 09:57:59 PM
In trying to understand C a little better, i wanted to look at the contents of windows.h. When I try to open it in the IDE with
"Add Files to Project..."
I get the error mesage:
Unable to add the file "windows.h" to the project. The target file cannot be determined from the source files extension"

What does this mean?

in another project I see the header files under a sub folder
"Include Files"

How do I create this sub folder?
Title: Re: opening windows.h
Post by: Stefan Pendl on May 29, 2008, 10:19:44 PM
The standard Windows header files can not be included in the project directly, they are included through the #include directive in the code.
You can add the line #include <windows.h> in the code, click on <window.h> with the right mouse button and select Open windows.h from the context menu.
Title: Re: opening windows.h
Post by: DMac on May 30, 2008, 05:14:15 PM
Actually, to view the included file in the IDE you must use the following syntax:

#include "windows.h"

using
#include <windows.h> causes the project to incorporate the header but the IDE will not display it.
Title: Re: opening windows.h
Post by: JohnF on May 30, 2008, 06:07:12 PM
Actually, to view the included file in the IDE you must use the following syntax:

#include "windows.h"

using
#include <windows.h> causes the project to incorporate the header but the IDE will not display it.

No, that's no right. Using #include <windows.h> works fine when using right mouse button.

John
Title: Re: opening windows.h
Post by: TimoVJL on May 30, 2008, 07:01:40 PM
Quote
in another project I see the header files under a sub folder
"Include Files"
Copy that directory below your project directory.
Look at that FooTest.

Title: Re: opening windows.h
Post by: DMac on June 02, 2008, 05:34:43 PM
John wrote:
Quote
No, that's no right. Using #include <windows.h> works fine when using right mouse button.

Here I've been using Pelles IDE for several years and doing things the hard way.   :-\

Thanks for the tip.