MySQL Forums
Forum List  »  Connector/C++

Cmake Building Issues C++ Connector
Posted by: Dan H
Date: December 23, 2011 05:18PM

Hey guys.
My efforts in developping database applications with C++ stuck still at the installation of the connector... It takes two full days until I had understood that i don't need to write the CmakeLists.txt for myself ... anyway
I use Cygwin under windows 7.0 with the newest release of MySQL Server and Cmake. I'm sure, that i have installed the C Client libraries (wizzard ticks it).

Cmake doesn't work with following output:
[...] compiler runs^^
-- Environment link flags:
-- Boost version: 1.43.0
-- BOOST_INCLUDE_DIRS=/usr/include
-- mysql_config was found C:/MySQL/MySQL Server 5.5/bin/mysql_config.pl
CMake Error at FindMySQL.cm:202 (MESSAGE):
mysql_config wasn't found, -DMYSQL_CONFIG_EXECUTABLE=...
Call Stack (most recent call first):
CMakeLists.txt:166 (INCLUDE)


CMake Error at FindMySQL.cm:204 (MESSAGE):
Cannot find MySQL. Include dir: library dir: cxxflags: "-IC:/Program Files
(x86)/MySQL/include" "/MT" "/Zi" "/O2" "/Ob1" "/D" "NDEBUG" "-DDBUG_OFF"
Call Stack (most recent call first):
CMakeLists.txt:166 (INCLUDE)


-- Configuring incomplete, errors occurred!
-- Cache values
CMAKE_BUILD_TYPE:STRING=
CMAKE_INSTALL_PREFIX:PATH=C:/MySQL
MYSQLCLIENT_STATIC_BINDING:BOOL=1
MYSQLCPPCONN_BUILD_EXAMPLES:BOOL=1
MYSQLCPPCONN_DT_RPATH:STRING=
MYSQLCPPCONN_DYNLOAD_MYSQL_LIB:FILEPATH=C:/MySQL/MySQL Server 5.5/lib
MYSQLCPPCONN_GCOV_ENABLE:BOOL=0
MYSQLCPPCONN_ICU_ENABLE:BOOL=0
MYSQLCPPCONN_STLPORT_ENABLE:BOOL=0
MYSQLCPPCONN_TEST_NOT_IMPLEMENTED:BOOL=0
MYSQLCPPCONN_TRACE_ENABLE:BOOL=0
MYSQL_CONFIG_EXECUTABLE:FILEPATH=C:/MySQL/MySQL Server 5.5/bin/mysql_config.pl
MYSQL_LIB:FILEPATH=C:/MySQL/MySQL Server 5.5/lib

Envrioment Var is set in Control Panel/SYSTEM MYSQL_DIR=C:\MySQL\MySQL Server 5.5\ ...
MySQL is located at "C:\MySQL\MySQL Server 5.5\"
Connector at: "C:\MySQL\Connector C++ 1.1.0"
Which flags I have to change or set?
Please, somebody has to give me a hint. I need the connector very soon.
It is my prefered christmas wish. Thanks for your time and patatience to handle my nooby problems.
Greetings from germany!
Happy Christmas!

EDIT:

[...] I fixed the first issue, deleting the mysql MYSQL_CONFIG_EXECUTABLE flag.
I guess because I use a windows environment, it takes the System var instead.
But from bad to worse... now i got a linking error.. please is there someone to help me out:


-- Check for working C compiler: /usr/bin/gcc.exe
-- Check for working C compiler: /usr/bin/gcc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++.exe
-- Check for working CXX compiler: /usr/bin/c++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Environment compile flags:
-- Environment link flags:
-- Boost version: 1.43.0
-- BOOST_INCLUDE_DIRS=/usr/include
-- ENV{MYSQL_DIR} = C:\MySQL\MySQL Server 5.5\
-- MySQL Include dir: C:/MySQL/MySQL Server 5.5/include
-- MySQL Library : C:/MySQL/MySQL Server 5.5/lib
-- MySQL Library dir: C:/MySQL/MySQL Server 5.5
-- MySQL CXXFLAGS:
-- MySQL Link flags:
-- Looking for mysql_set_character_set
-- Looking for mysql_set_character_set - not found
CMake Error at FindMySQL.cm:182 (MESSAGE):
Versions < 4.1.13 (for MySQL 4.1.x) and < 5.0.7 for (MySQL 5.0.x) are not
supported. Please update your libraries.

# COMMENT Here I disagree with the massage, because I had used the newest avaiable istalltion of MySQL Server (5.5) ... I checked the "FindMySql.cm"-file and I suppose this message is thron everytime a error occurs, even the error has a other source... please i need a consistent advice...
#COMMENT END

Call Stack (most recent call first):
CMakeLists.txt:166 (INCLUDE)


-- Configuring incomplete, errors occurred!
-- Cache values
CMAKE_BUILD_TYPE:STRING=
CMAKE_INSTALL_PREFIX:PATH=C:/MySQL
MYSQLCLIENT_STATIC_BINDING:BOOL=1
MYSQLCPPCONN_BUILD_EXAMPLES:BOOL=1
MYSQLCPPCONN_DT_RPATH:STRING=
MYSQLCPPCONN_DYNLOAD_MYSQL_LIB:FILEPATH=C:/MySQL/MySQL Server 5.5/lib
MYSQLCPPCONN_GCOV_ENABLE:BOOL=0
MYSQLCPPCONN_ICU_ENABLE:BOOL=0
MYSQLCPPCONN_STLPORT_ENABLE:BOOL=0
MYSQLCPPCONN_TEST_NOT_IMPLEMENTED:BOOL=0
MYSQLCPPCONN_TRACE_ENABLE:BOOL=0
MYSQL_CONFIG_EXECUTABLE:FILEPATH=MYSQL_CONFIG_EXECUTABLE-NOTFOUND
MYSQL_INCLUDE_DIR:PATH=C:/MySQL/MySQL Server 5.5/include
MYSQL_LIB:FILEPATH=C:/MySQL/MySQL Server 5.5/lib


Greetings!

Dan



Edited 2 time(s). Last edit at 12/25/2011 05:24PM by Dan H.

Options: ReplyQuote


Subject
Views
Written By
Posted
Cmake Building Issues C++ Connector
6389
December 23, 2011 05:18PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.