Hello everybody!
I would like to know "how to link header file (.h file ) and source file (.c file ) in c.
I have downloaded many .h files and .c files. I have noticed that the functions are declared in .h files and denined in .c files. I don't know how to link them in main program.
Please explain me.
thanks in advance,
Moe
Recommended Answers
Jump to Post.h files are includes in .c files
// myfile.c // #include "myheader.h" // rest of c program here
Then run your compiler against all the *.c files. It will create *.obj files which can be used by the linker to create the executable file.
Beyone that, …
Jump to PostWhat compiler are you using? If you use Microsoft Visual C++ 2005 Express, the download includes project files.
If that is your compiler, then the compiler will spew out a whole bunch of warnings about using deprecated C functions. you can disable the warning with a pragma. put this …
Jump to PostDon't laugh at me.
I am using turbo c compiler. It is an ancient software.
I also try to use Borland 5.5. But that gives many error when I compile .c file.:cheesy: :cheesy: :cheesy: :cheesy: :cheesy: :cheesy: :cheesy:
trash those old ancient compilers! you can get pretty good …
Jump to PostYou are also ancient dragon.
Are you good?
It is just joke.
Please guide me.Sorry -- I couldn't resist the laughter.
you cannot use TC because it is too old and does not know about long file names -- file names that are longer than 8 characters followed …
Jump to Post>> would like to test that api program in c, not vc.
you won't test it with Turbo C. See my previous post (I changed it so you might have to re-read it)
All 44 Replies
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
Moe
0
Light Poster
Moe
0
Light Poster
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
Moe
0
Light Poster
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
Moe
0
Light Poster
Moe
0
Light Poster
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
Moe
0
Light Poster
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
Moe
0
Light Poster
Moe
0
Light Poster
Moe
0
Light Poster
Moe
0
Light Poster
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
WolfPack
491
Posting Virtuoso
Team Colleague
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
Moe
0
Light Poster
WolfPack
491
Posting Virtuoso
Team Colleague
Moe
0
Light Poster
Moe
0
Light Poster
WolfPack
491
Posting Virtuoso
Team Colleague
Moe
0
Light Poster
WolfPack
491
Posting Virtuoso
Team Colleague
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
Moe
0
Light Poster
Moe
0
Light Poster
iamthwee
1,547
Banned
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.