]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/link.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: macros to force linking modules which might otherwise be
4 // discarded by the linker
5 // Author: Vaclav Slavik
6 // Copyright: (c) Vaclav Slavik
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
13 // This must be part of the module you want to force:
14 #define wxFORCE_LINK_THIS_MODULE(module_name) \
15 extern void _wx_link_dummy_func_##module_name (); \
16 void _wx_link_dummy_func_##module_name () { }
19 // And this must be somewhere where it certainly will be linked:
20 #define wxFORCE_LINK_MODULE(module_name) \
21 extern void _wx_link_dummy_func_##module_name (); \
22 static struct wxForceLink##module_name \
24 wxForceLink##module_name() \
26 _wx_link_dummy_func_##module_name (); \
28 } _wx_link_dummy_var_##module_name;