Re: [pcre-dev] [Bug 981] New: pcrecpp usage as static lib an…

Top Page
Delete this message
Author: Philip Hazel
Date:  
To: 981
CC: pcre-dev
Subject: Re: [pcre-dev] [Bug 981] New: pcrecpp usage as static lib and MSVC 2008
On Mon, 10 May 2010, Vincent wrote:

>            Summary: pcrecpp usage as static lib and MSVC 2008
>            Product: PCRE
>            Version: 7.9


Have you tried the most recent release, which is 8.02?

> There are two way to fix them :
>
> * First one is to use a define before including the file
> #define PCRE_STATIC 1
> #include <pcrecpp.h>


> I did not saw anything about that in the documentation.


I'm not a Windows user, so I have to be told what needs documenting for
that operating system. I see that there *is* mention of something
similar in the comments of the pcredemo.c program:

---------------------------------------------------------------------
Building under Windows:

If you want to statically link this 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. So in this environment, uncomment the following line. */

/* #define PCRE_STATIC */
---------------------------------------------------------------------

Should I include something like this in the main PCRE documentation?

Philip

--
Philip Hazel