NO

Author Topic: Header Files  (Read 3396 times)

John

  • Guest
Header Files
« on: April 18, 2005, 04:03:16 PM »
I have a project made up of only one file named "main.c". Now I want to expand on it and use a header file named "main.h". How do I add that to the current project?

I've created the "main.h" and I'm able to use it but it doesn't show up as part of the project and when I try to add it to the project I get an error saying that The target file cannot be determined from the source files extension.

Thanks,
John

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Header Files
« Reply #1 on: April 18, 2005, 06:26:18 PM »
If main.c contains the line
Code: [Select]

#include "main.h"

you can use the "Update all dependencies" choice in the Project menu. This will scan all *.c files in the project for #include "somefile.h", but not #include <somefile.h>, assuming this is a system file (like stdio.h etc.).

Pelle
/Pelle

John

  • Guest
Header Files
« Reply #2 on: April 18, 2005, 07:18:34 PM »
Ok, that worked. Thanks Pelle!