Apr 18, 2010

Building 5.5.4-m3 in Visual Studio 10 beta 2

I've got new Window7 system with Visual Studio 10 beta 2, so decided to build MySQL from source.

mysql-5.5.4-m3.tar.gz

First problem was cmake, which reported
"Make Error: Could not create named generator Visual Studio 10"

It was solved by installing nightly build of cmake from http://www.cmake.org/files/dev/

I've managed generate MySQL.sln file, so next step is compiling.
It gave plenty errors like:

mysql-5.5.4-m3\include\my_global.h(1174): fatal error C1189: #error : sizeof(void *) is neither sizeof(int) nor sizeof(long) nor sizeof(long long)

I eliminated these errors by ugly fix with adding following lines right before statements which generate the error in my_global.h .

#ifndef SIZEOF_CHARP
#define SIZEOF_CHARP SIZEOF_LONG
#endif

Afterward I got error shared access writing to Debug\gen_lex_hash.exe , but rebuild finally showed "no errors".

Conclusion:
mysql-5.5.4-m3 was finally built and started with Visual Studio 10 Beta 2 after couple manual fixes.

No comments:

Post a Comment