]> git.saurik.com Git - wxWidgets.git/blob - include/wx/link.h
Don't define __STRICT_ANSI__, we should build both with and without it.
[wxWidgets.git] / include / wx / link.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/link.h
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 /////////////////////////////////////////////////////////////////////////////
9
10 #ifndef _WX_LINK_H_
11 #define _WX_LINK_H_
12
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 () { }
17
18
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 \
23 { \
24 wxForceLink##module_name() \
25 { \
26 _wx_link_dummy_func_##module_name (); \
27 } \
28 } _wx_link_dummy_var_##module_name;
29
30
31 #endif // _WX_LINK_H_