consider the following header and two variations on the same source file.
// myheader.h
#include <stdio.h>
inline void bla(){
printf("hello\n");
}
// mysource.c
#include "myheader.h"
void bla();
int main(){
bla();
}
// mysource2.c
#include "myheader.h"
extern void bla();
int main(){
bla();
}
Both compile fine and outputs hello
as expected. So what does the extern
qualifier in mysource2.c
add here? When is it needed?
EDIT: I should add that I'm using GCC with standard flags.