Commit 7fe391ad authored by Alexander Barkov's avatar Alexander Barkov

Fixing compilation failure on Windows.

"PCRE_STATIC" must be defined before including pcre.h
to avoid linking errors:
- unresolved external symbol __imp_regerror
- unresolved external symbol __imp_pcre_exec
parent 90b8fee6
......@@ -36,8 +36,7 @@ ENDIF(UNIX)
MYSQL_ADD_EXECUTABLE(mysqltest mysqltest.cc COMPONENT Test)
SET_SOURCE_FILES_PROPERTIES(mysqltest.cc PROPERTIES COMPILE_FLAGS "-DTHREADS")
TARGET_LINK_LIBRARIES(mysqltest mysqlclient pcre)
TARGET_LINK_LIBRARIES(mysqltest mysqlclient pcreposix)
TARGET_LINK_LIBRARIES(mysqltest mysqlclient pcre pcreposix)
SET_TARGET_PROPERTIES(mysqltest PROPERTIES ENABLE_EXPORTS TRUE)
......
......@@ -44,6 +44,7 @@
#include <hash.h>
#include <stdarg.h>
#include <violite.h>
#define PCRE_STATIC 1 /* Important on Windows */
#include <pcreposix.h> /* pcreposix regex library */
#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
......
......@@ -25,6 +25,7 @@
#include "thr_malloc.h" /* sql_calloc */
#include "item_func.h" /* Item_int_func, Item_bool_func */
#define PCRE_STATIC 1 /* Important on Windows */
#include <pcre.h> /* pcre header file */
extern Item_result item_cmp_type(Item_result a,Item_result b);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment