The path problem of C language include

when using a-sharpinclude reference, the reference is not smooth.
the following is the code:

-sharpinclude "print.h"
int main(void){
  printHello();
  return 0;
}

< hr >
-sharpinclude <stdio.h>

void printHello(void);

< hr >
-sharpinclude "print.h"
    void printHello(){
      printf("Hello World \n");
}


< hr >

The level of

is like this, how can you solve it?

Mar.13,2021

when compiling, if you are using GCC or clang, you can add compilation instructions:

https://segmentfault.com/q/10...</a>

<h2>Update</h2>

it seems you write wrong compile commands, try simplest solution:

 gcc print.c test.c 
 ./a.out

Menu