use dllexport/dllimport attributes for windows builds
Brought to you by:
metaplasma,
temporal
The attached patch adds new macro MODPLUGEXPORT which expands to __declspec(dllexport) when building libmodplug as a dll and to __declspec(dllimport) when using the libmodplug dll. Developers should be advised to add MODPLUG_STATIC among their defines if they are linking against a static build of libmodplug, so that dllimport won't be assumed.
The mechanism can be expanded to use visibility attributes of gcc4+, possibly by adding a MODPLUG_PRIVATE macro, but I didn't do that. (Patch tracker item #3 suggests one approach to do that.)