Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#21 use dllexport/dllimport attributes for windows builds

open
nobody
None
5
2013-09-26
2013-09-26
Ozkan Sezer
No

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.)

1 Attachments

Discussion