Compile MySQL source code using Eclipse-cpp in Ubuntu
1. Download The eclipse-cpp-mars-2-linux-gtk-x86_64.tar.gz package, decompress it in Ubuntu, and run it.
Jdk errors may occur because jdk is not installed or the jdk version is too low. Jdk1.8 is required to be the lowest version. Eclipse needs.
2. Download the MySQL source code file: mysql-boost-5.7.12.tar.gz. Decompress in Ubuntu
The decompressed MySQL source code file is stored in the/opt/source/folder.
3. Generate the make File
Run: path = 'dirname $0'
Cmake $ path /.. -DCMAKE_CXX_FLAGS =-m64-DCMAKE_C_FLAGS =-m64-DWITH_DEBUG = 1-DWITH_NDBCLUSTER = 0 $ @-DDOWNLOAD_BOOST = 1-DWITH_BOOST =/opt/source/mysql-5.7.12/boost/clusters/
Note that the following path is your source code placement path. This step follows the instructions in mysql-InnoDB Storage engine.
4. Create an empty C ++ project: Name the project mysql5.7.12.
5. Right-click the project mysql5.7.12. select new folder and import/opt/source/mysql5.7.12 to the project.
6. After importing the folder, select Build directory as the path of the source code, for example:
7. After the above compilation configuration is complete, the program will automatically start to execute the compilation, as shown in: