How to create a head file?

Started by heliang6291, May 02, 2013, 05:35:48 AM

Previous topic - Next topic

heliang6291

I can't create a head file in the project,
if I write a head file,how to add in my project?
Help me please,thanks.

czerny

You mean a header file?

May be your problem is, that only local header files are included in the project file list. And even the local header files are listed only if they where referenced by one or more source files.

heliang6291

Quote from: czerny on May 02, 2013, 08:12:51 PM
You mean a header file?

May be your problem is, that only local header files are included in the project file list. And even the local header files are listed only if they where referenced by one or more source files.

yes, a header file.
I want to write a header file,and add in my project.

DMac

In the Pelles C IDE click File>New>Source Code.

You will see a new source tab open labeled "untitled".

With this tab selected in the Pelles C IDE click File>Save as...

You will see the Save As dialog.  Select "Include file (*h) from the "Save as type" drop-down and enter a file name and save.

To  see the file in the project tree do the following:  In your C source file type #include "[filename].h" and then in the project tree right click on the project icon and select "update all dependencies".

You will now see the include file you created there.
No one cares how much you know,
until they know how much you care.

heliang6291

Quote from: DMac on May 03, 2013, 07:13:02 PM
In the Pelles C IDE click File>New>Source Code.

You will see a new source tab open labeled "untitled".

With this tab selected in the Pelles C IDE click File>Save as...

You will see the Save As dialog.  Select "Include file (*h) from the "Save as type" drop-down and enter a file name and save.

To  see the file in the project tree do the following:  In your C source file type #include "[filename].h" and then in the project tree right click on the project icon and select "update all dependencies".

You will now see the include file you created there.

Thank you very much,it's OK.