Try this:

```
//1.h
static const char *msg = "hello";

//1.c
#include <stdio.h>
#include "1.h"
void f() { printf("%s\n", msg); }

//2.c
#include <stdio.h>
#include "1.h"
void f();
int main() {
f();
printf("%s\n", msg);
return 0;
}
```