blob: cd42d1a2f9ac33f0f7ac83c9725ca949dbae96f1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#ifdef _WIN32
#define DLLEXPORT __declspec( dllexport )
#else
#define DLLEXPORT
#endif
typedef int (*multiply_by_two_func)( int );
DLLEXPORT int multiply_by_two( int a );
int multiply_by_two( int a ) {
return a * 2;
}
extern int DLLEXPORT seven = 7;
typedef struct {
int major;
int minor;
multiply_by_two_func func;
} module_descriptor_t;
extern DLLEXPORT module_descriptor_t mod_descr = {
1, 0, &multiply_by_two
};
|