[pcre-dev] Windows build (fwd)

Top Page
Delete this message
Author: Philip Hazel
Date:  
To: pcre-dev
CC: Davide Libenzi
Subject: [pcre-dev] Windows build (fwd)
Folks, I have received the message below. As I am not a Windows user, I
have no way of judging whether it is a useful addition to PCRE or not.
Please can the Windows experts among you take a look? I think that
attachments won't make it to the mailing list, so I have put the two
files that Davide submitted here:

ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/Testing/winpatch
ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/Testing/winmakfile

Is it worth having (and maintaining) yet another way of building PCRE?

Regards,
Philip

--
Philip Hazel

---------- Forwarded message ----------
Date: Sat, 16 Jan 2010 19:09:39 -0800 (PST)
From: Davide Libenzi <davidel@???>
To: ph10@???
Subject: Windows build

Hi Philip,

I find myself in having to use PCRE on Windows sometimes, and I keep
around those two patches that allows me to build using MSVC.
To apply:

$ patch -p1 < config-win
$ patch -p1 < winmakfile

On Windows, once the command line enviroment is properly set:

C:> nmake /f makefile.win CFG={debug, release}

Instead of touching the Unix config.h file, a dedicated winconfig.h file
is introduced, and all the instances of:

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

are replaced with:

#include "sysconfig.h"

Inside sysconfig.h you handle system dependency:

#if defined(HAVE_CONFIG_H)
#include "config.h"
#elif defined(HAVE_WINCONFIG_H)
#include "winconfig.h"
#endif


The included Windows makefile builds static and shared libraries for PCRE
and PCREPOSIX.
Feel free to use them in any way you like.



- Davide