i can add .c to project ,but when i add .h it doesn't work
Hi Mr Phantom,
At the top of your .c file add
#include "myheader.h"
or
#include <windows.h>
And then right click on your project and select update dependencies.
(about:invalid)
Thanks!
But i think i was wrong about the description. It's not that it doesn't work.
I meant that i can't add .h files in the resource management right of window. If I want to modify an .h file, do I have to find it in Windows Explorer?
You have to close resource editor and then open rc-file as text
Right mouse button -> Open as -> Text
Hi butaphantom,
Quote from: butaphantom on March 19, 2025, 03:00:37 AMi can add .c to project ,but when i add .h it doesn't work
To add an existing .h file to your project and have it show up in the sources pane
the .h file name must be entered into the .c source file as DMac mentioned.
To do that you use a statement that looks like this:
#include <stdio.h> <----- for system includes
OR a statement that looks like this:
#include "myfile.h" <----- for includes specifically for your project.
If you need to create the .h file use File - New - Source Code and save the
file with .h extension in your project directory. After that add the
#include "my_h_file_name.h" to your C source(s) as needed.
Hope this clarifies how to add a .h file to your project.
Also I'll mention that only .h files you make for your project (those in quotes) will show in the window.
System .h files will not show up there since you should not be editing them.....
John Z 👍
Thanks everybody!
like your sad, i try it, i made it
: )