diff options
author | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2008-01-25 17:57:39 +0000 |
---|---|---|
committer | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2008-01-25 17:57:39 +0000 |
commit | 8218b2bf730347166d983e25ba5b1dee4e86c08a (patch) | |
tree | 00fe26c6f591c0992052e3f01d285c93a5105978 /NON-UNIX-USE | |
parent | 6d4c02ff494d01e9eb26bbff7f3f1519c4cfd238 (diff) | |
download | pcre-8218b2bf730347166d983e25ba5b1dee4e86c08a.tar.gz |
Further tidies in comments about Windows use.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@317 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'NON-UNIX-USE')
-rw-r--r-- | NON-UNIX-USE | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/NON-UNIX-USE b/NON-UNIX-USE index 6bbcff5..34c8d0a 100644 --- a/NON-UNIX-USE +++ b/NON-UNIX-USE @@ -8,6 +8,7 @@ This document contains the following sections: The C++ wrapper functions Building for virtual Pascal Stack size in Windows environments + Linking programs in Windows environments Comments about Win32 builds Building PCRE on Windows with CMake Use of relative paths with CMake on Windows @@ -181,6 +182,14 @@ significantly slower when this is done. There is more about stack usage in the "pcrestack" documentation. +LINKING PROGRAMS IN WINDOWS ENVIRONMENTS + +If you want to statically link a program against a PCRE library in the form of +a non-dll .a file, you must define PCRE_STATIC before including pcre.h, +otherwise the pcre_malloc() and pcre_free() exported functions will be declared +__declspec(dllimport), with unwanted results. + + COMMENTS ABOUT WIN32 BUILDS (see also "BUILDING PCRE WITH CMAKE" below) There are two ways of building PCRE using the "configure, make, make install" @@ -220,10 +229,13 @@ also link with libpcre, which contains the basic functions. (Some earlier releases of PCRE included the basic libpcre functions in libpcreposix. This no longer happens.) -If you want to statically link your program against a non-dll .a file, you must -define PCRE_STATIC before including pcre.h, otherwise the pcre_malloc() and -pcre_free() exported functions will be declared __declspec(dllimport), with -unwanted results. +A user submitted a special-purpose patch that makes it easy to create +"pcre.dll" under mingw32 using the "msys" environment. It provides "pcre.dll" +as a special target. If you use this target, no other files are built, and in +particular, the pcretest and pcregrep programs are not built. An example of how +this might be used is: + + ./configure --enable-utf --disable-cpp CFLAGS="-03 -s"; make pcre.dll Using Cygwin's compiler generates libraries and executables that depend on cygwin1.dll. If a library that is generated this way is distributed, |