niellus16
niellus16

Reputation: 51

Building MySQL Connector/C++ from source (can't find Boost libraries error)

I'm trying to make a release build of MySQL Connector/C++ 1.1.1 from the source code (on Windows 7) so that I can use it (the mysqlcppconn.dll file only) in a Win32 project in Visual Studio 2010. I followed these instructions:

http://dev.mysql.com/doc/refman/5.1/en/connector-cpp-installation-source-windows.html

But when I try to execute the command cmake -G "Visual Studio 10" I get an error message saying that Boost or some of it's libraries can't be found. The error was:

C:\CMake 2.8\bin>cmake -G "Visual Studio 10"
CMake Warning (dev) in CMakeLists.txt:
A logical block opening on the line

C:/CMake 2.8/bin/CMakeLists.txt:39 (if)

closes on the line

C:/CMake 2.8/bin/CMakeLists.txt:41 (endif)

with mis-matching arguments.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Environment compile flags:
-- Environment link flags:
-- Could NOT find Boost
-- Could NOT find Boost
CMake Error at CMakeLists.txt:120 (MESSAGE):
Boost or some of its libraries found.  If not in standard place please set
-DBOOST_ROOT:STRING=

-- Configuring incomplete, errors occurred!

First I tried to copy the folder boost_1_49_0 to the same directory as CMake (C:\CMake 2.8\bin), but that resulted in the same error. Then I tried to set the -DBOOST_ROOT:STRING= variable as the message indicates with the command *cmake -DBOOST_ROOT:STRING=\boost_1_49_0*, but that didn't work either.

So my question is: how do I set the variable to the correct value so that the Boost libraries can be found? (I searched google on the name of the variable, but no results were found)?

Upvotes: 3

Views: 3111

Answers (1)

niellus16
niellus16

Reputation: 51

Fixed it! I have changed the BOOST_ROOT variable in the CMakeList file to the correct path and then it finally worked.

Upvotes: 2

Related Questions