1. Modify cmakelists.txt
Add the following statement after defining the cmake_module_path variable:
# Add By Snoopy # Set the boost variable set (cmake_include_path "F:/Boost/include/boost1.49") Set (cmake_library_path "F:/Boost/lib/boost1.49 ") # Set Oracle related variables set (ORACLE_HOME "D:/Oracle/product/10.2.0/db_1") # Set SQLite related variables set (sqlite3_include_dir "J: /Visual Studio 2010/projects/sqlite370/sqlite370 ") Set (sqlite3_library" J:/Visual Studio 2010/projects/sqlite370/release/sqlite3.lib ")
2. Install mysql-connector-c-6.0.2-win32.msi
Of course other versions are acceptable. An error is reported during MySQL compilation.
3. Add a boost File
In the soci-3.1.0 \ cmake \ modules directory to add a few files, boost this part can pass.
Boost_date_time-vc100-mt-1_49.dll
Boost_date_time-vc100-mt-1_49.lib
Boost_date_time-vc100-mt-gd-1_49.dll
Boost_date_time-vc100-mt-gd-1_49.lib
4. Modify the version in boost. cmake.
Change the boost version in this file from 1.36 to 1.49. Because I compiled it with 1.49.
5. Run cmd.
Cmake-G "Visual Studio 10" ^-dwith_boost = on ^-dwith_mysql = on ^-dwith_oracle = on ^-dwith_sqlite = on ^ (...)..