[pcre-dev] [Bug 981] pcrecpp usage as static lib and MSVC 20…

Páxina inicial
Borrar esta mensaxe
Autor: Philip Hazel
Data:  
Para: pcre-dev
Asunto: [pcre-dev] [Bug 981] pcrecpp usage as static lib and MSVC 2008
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=981




--- Comment #1 from Philip Hazel <ph10@???> 2010-05-10 20:33:12 ---
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


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email