It works on windows I think. dllimport/export on static variables acts as a shorthand to automatically do the indirection. e.g.

```c
__declspec(dllexport) int bar = 5;
```

is roughtly equivalent to

```c
int bar_value = 5;
__declspec(dllexport) int* bar = &bar_value;
```

and

```c
__declspec(dllimport) int bar;
bar++
```

becomes

```c
__declspec(dllimport) int* bar;
*bar++
```