LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Compiling a header file with gcc (https://www.linuxquestions.org/questions/linux-software-2/compiling-a-header-file-with-gcc-161102/)

Squall 03-22-2004 04:28 PM

Compiling a header file with gcc
 
Okay, I have a file: "test4.c" that needs "test4.h" how do I compile both of them? When I try it, gcc says header file requested, but doesn't actually make test4.c recognize test4.h

Tinkster 03-22-2004 04:55 PM

You don't compile headers ...

Suppose they're both in the same directory,
all you need to have is an #include "test4.h"
in test4.c, and then do
gcc test4.c -o test4


Cheers,
Tink

makko 04-07-2004 05:16 AM

Had the same prob but that works, thanks.


All times are GMT -5. The time now is 07:38 PM.