[Solved] Proper use of header files


Here’s a complete and working example of your goal.

main.c

#include "somefile.h"

int main() {
    somefunc();
    return 0;
}

somefile.h

#ifndef RHURAC_SOMEFILE_H
#define RHURAC_SOMEFILE_H

void somefunc();

#endif

somefile.c

#include <stdio.h>
#include "somefile.h"

void somefunc() {
    printf("hello\n");
}

example build ( gcc )

gcc main.c somefile.c -o main

output

$ ./main 
hello

3

solved Proper use of header files