[pcre-dev] pcre-8.42 build failure in windows platform

Top Page
Delete this message
Author: Parth Patel
Date:  
To: pcre-dev
Subject: [pcre-dev] pcre-8.42 build failure in windows platform
Hi,

I have face one problem while building pcre-8.42 3rd party library in
windows platform.
Its building in non windows.


pcregrep.c.obj : error LNK2019: unresolved external symbol _snprintf
referenced in function _compile_pattern
pcregrep.exe : fatal error LNK1120: 1 unresolved externals
NMAKE : fatal error U1077: C:\Program Files\CMake\bin\cmake.exe : return
code 0xffffffff
Stop.
NMAKE : fatal error U1077: C:\Program Files (x86)\Microsoft Visual Studio
12.0\VC\BIN\nmake.EXE : return code 0x2
Stop.
NMAKE : fatal error U1077: C:\Program Files (x86)\Microsoft Visual Studio
12.0\VC\BIN\nmake.EXE : return code 0x2
Stop.
make: *** [Makefile:188: all] Error 2


Can you help me on same ?

if i add below statements in pcregrep.c file then it works fine.

#ifdef _WIN32
    #define snprintf _snprintf
#endif


Are you recommend for this. Or do you have any other workaround ?

Thanks,
Parth