86 |
/* When compiling a DLL for Windows, the exported symbols have to be declared |
/* When compiling a DLL for Windows, the exported symbols have to be declared |
87 |
using some MS magic. I found some useful information on this web page: |
using some MS magic. I found some useful information on this web page: |
88 |
http://msdn2.microsoft.com/en-us/library/y4h7bcy6(VS.80).aspx. According to the |
http://msdn2.microsoft.com/en-us/library/y4h7bcy6(VS.80).aspx. According to the |
89 |
information there, using __declspec(dllesport) without "extern" we have a |
information there, using __declspec(dllexport) without "extern" we have a |
90 |
definition; with "extern" we have a declaration. The settings here override the |
definition; with "extern" we have a declaration. The settings here override the |
91 |
setting in pcre.h (which is included below); it defines only PCRE_EXP_DECL, |
setting in pcre.h (which is included below); it defines only PCRE_EXP_DECL, |
92 |
which is all that is needed for applications, which import the symbols. We use: |
which is all that is needed for applications (they just import the symbols). We |
93 |
|
use: |
94 |
|
|
95 |
PCRE_EXP_DECL for declarations |
PCRE_EXP_DECL for declarations |
96 |
PCRE_EXP_DEFN for definitions of exported functions |
PCRE_EXP_DEFN for definitions of exported functions |
103 |
|
|
104 |
The reason for wrapping this in #ifndef PCRE_EXP_DECL is so that pcretest, |
The reason for wrapping this in #ifndef PCRE_EXP_DECL is so that pcretest, |
105 |
which is an application, but needs to import this file in order to "peek" at |
which is an application, but needs to import this file in order to "peek" at |
106 |
internals, can #include pcre.h first, can get an application's-eye view. |
internals, can #include pcre.h first to get an application's-eye view. |
107 |
|
|
108 |
In principle, people compiling for non-Windows, non-Unix-like (i.e. uncommon, |
In principle, people compiling for non-Windows, non-Unix-like (i.e. uncommon, |
109 |
special-purpose environments) might want to stick other stuff in front of |
special-purpose environments) might want to stick other stuff in front of |