C++ – Compiling MySQL custom engine in Visual Studio 2008

ccompiler-constructionMySQLvisual studiovisual-studio-2008

I have compilation errors while compiling MySQL sample of storage engine from MySQL 5.1.36 sources. Looks to me that I set all paths to include subdirectories but that seems not enough.

Here are the errors:

1>c:\users\roman\desktop\mysql-5.1.36\sql\field.h(1455) : error C2065: 'FRM_VER' : undeclared identifier

1>c:\users\roman\desktop\mysql-5.1.36\sql\item_cmpfunc.h(1395) : error C2146: syntax error : missing ';' before identifier 'preg'

1>c:\users\roman\desktop\mysql-5.1.36\sql\item_cmpfunc.h(1395) : error C4430: missing type specifier
– int assumed. Note: C++ does not support default-int

1>c:\users\roman\desktop\mysql-5.1.36\sql\item_cmpfunc.h(1395) : error C4430: missing type specifier
– int assumed. Note: C++ does not support default-int

Best Answer

I had to include mysql_version.h.in library that contain all appropriate variables like FRM_VER, etc. That resolved the errors metioned above.

Related Topic