[Pcre-svn] [525] code/trunk/doc: Put the comment about Windo…

Página Inicial
Delete this message
Autor: Subversion repository
Data:  
Para: pcre-svn
Assunto: [Pcre-svn] [525] code/trunk/doc: Put the comment about Windows static linking in more places.
Revision: 525
          http://vcs.pcre.org/viewvc?view=rev&revision=525
Author:   ph10
Date:     2010-05-26 11:50:24 +0100 (Wed, 26 May 2010)


Log Message:
-----------
Put the comment about Windows static linking in more places.

Modified Paths:
--------------
    code/trunk/doc/pcreapi.3
    code/trunk/doc/pcresample.3


Modified: code/trunk/doc/pcreapi.3
===================================================================
--- code/trunk/doc/pcreapi.3    2010-05-24 17:06:28 UTC (rev 524)
+++ code/trunk/doc/pcreapi.3    2010-05-26 10:50:24 UTC (rev 525)
@@ -132,6 +132,12 @@
 and PCRE_MINOR to contain the major and minor release numbers for the library.
 Applications can use these to include support for different releases of PCRE.
 .P
+In a Windows environment, if you want to statically link an application program
+against a non-dll \fBpcre.a\fP file, you must define PCRE_STATIC before
+including \fBpcre.h\fP, because otherwise the \fBpcre_malloc()\fP and
+\fBpcre_free()\fP exported functions will be declared
+\fB__declspec(dllimport)\fP, with unwanted results.
+.P
 The functions \fBpcre_compile()\fP, \fBpcre_compile2()\fP, \fBpcre_study()\fP,
 and \fBpcre_exec()\fP are used for compiling and matching regular expressions
 in a Perl-compatible manner. A sample program that demonstrates the simplest
@@ -2121,6 +2127,6 @@
 .rs
 .sp
 .nf
-Last updated: 16 May 2010
+Last updated: 26 May 2010
 Copyright (c) 1997-2010 University of Cambridge.
 .fi


Modified: code/trunk/doc/pcresample.3
===================================================================
--- code/trunk/doc/pcresample.3    2010-05-24 17:06:28 UTC (rev 524)
+++ code/trunk/doc/pcresample.3    2010-05-26 10:50:24 UTC (rev 525)
@@ -39,8 +39,14 @@
   gcc -o pcredemo -I/usr/local/include pcredemo.c \e
       -L/usr/local/lib -lpcre
 .sp
-Once you have compiled the demonstration program, you can run simple tests like
-this:
+In a Windows environment, if you want to statically link the program against a
+non-dll \fBpcre.a\fP file, you must uncomment the line that defines PCRE_STATIC
+before including \fBpcre.h\fP, because otherwise the \fBpcre_malloc()\fP and
+\fBpcre_free()\fP exported functions will be declared
+\fB__declspec(dllimport)\fP, with unwanted results.
+.P
+Once you have compiled and linked the demonstration program, you can run simple
+tests like this:
 .sp
   ./pcredemo 'cat|dog' 'the cat sat on the mat'
   ./pcredemo -g 'cat|dog' 'the dog sat on the cat'
@@ -87,6 +93,6 @@
 .rs
 .sp
 .nf
-Last updated: 30 September 2009
-Copyright (c) 1997-2009 University of Cambridge.
+Last updated: 26 May 2010
+Copyright (c) 1997-2010 University of Cambridge.
 .fi