TankOs/SFGUI — Issue #40: Static linkage on Windows
Author: TheNexus
Created: 2011-10-14 14:46:46+00:00
State: open

The current code in Config.hpp looks like this:

```cpp
#ifdef SFGUI_EXPORTS
#define SFGUI_API __declspec( dllexport )
#else
#define SFGUI_API __declspec( dllimport )
#endif
```

This only takes dynamic linking with DLLs into account. If SFGUI is linked statically, no symbols are imported/exported. I suggest to expand the case differentiation as follows (or directly with #elif):

```cpp
#ifdef SFGUI_STATIC
#define SFGUI_API
#else
#ifdef SFGUI_EXPORTS
#define SFGUI_API __declspec( dllexport )
#else
#define SFGUI_API __declspec( dllimport )
#endif
#endif
```