Building PCRE(older version) source code in windows environment is quite easy with CMake build system. Once you checkout the code from their SVN server using following command:
svn co svn://vcs.exim.org/pcre/code/trunk pcre
Install the CMake build system and issue the following command from the “pcre” folder to build the visual studio project/solution files.
Open the PCRE.sln file in visual studio and start compiling “pcre” project. It will create
a PCRE STATIC library file for linking it with other projects.
I used sample source code from this StackOverflow link. Created an empty visual studio project and added this code and compiled it. Initially i faced with the linking error and it can be fixed with added a #define for PCRE_STATIC.
You need to define it before including pcre.h file.
#define PCRE_STATIC 1
You need to include either pcred.lib or pcre.lib for building the final binary.