When the pcre2 library is compiled, config.h gets included, which
defines PCRE2_STATIC=1. However, when compiling the test suite,
config.h is not loaded, PCRE2_STATIC is undefined, so pcre2.h
defaults to specifying the __declspec(dllimport) attribute on all the
public API functions. It'll try to link against __imp_<symbol>, which
won't exist because pcre2 is a static library.
When the pcre2 library is compiled,
config.h
gets included, which definesPCRE2_STATIC=1
. However, when compiling the test suite,config.h
is not loaded,PCRE2_STATIC
is undefined, sopcre2.h
defaults to specifying the__declspec(dllimport)
attribute on all the public API functions. It'll try to link against__imp_<symbol>
, which won't exist because pcre2 is a static library.Fixes: #1
Signed-off-by: Andrew Gunnerson chillermillerlong@hotmail.com