]> git.saurik.com Git - wxWidgets.git/blame - include/wx/link.h
wxRTC: fixed guidelines overwriting adjacent cell borders; corrected capitalisation...
[wxWidgets.git] / include / wx / link.h
CommitLineData
6cf2fb76
VZ
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
6cf2fb76
VZ
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) \
905a5e7f 21 extern void _wx_link_dummy_func_##module_name (); \
6cf2fb76
VZ
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_