problem with installing mysql c connector for mysql c++ connector
Posted by: Ivan Cheung
Date: November 07, 2012 04:03PM

Hi there,

I was wondering if anyone could help me. I've got XCode 4.2, and MAMP
server. With XCode and have been trying to develop a C++ application to
generate SQL commands to retrieve information from my MySQL database in
the MAMP database.

I wanted to download the Mysql C++ connector (extract tar file
mysql-connector-c++-1.0.5-osx10.5-x86-64bit) but the tutorials say I
need to download the Mysql C Connector (tar file
mysql-connector-c-6.0.2-osx10.5-x86-64bit) because it needs the API
first is that right?

shown here-
http://dev.mysql.com/doc/connector-cpp/en/connector-cpp-installation-source.html


Anyway after downloading it onto this directory

/Users/inhcheung/Documents/

hence

/Users/inhcheung/Documents/mysql-connector-c-6.0.2-osx10.5-x86-64bit 2

I followed the instructions on this page

http://dev.mysql.com/doc/refman/5.1/en/connector-c-building.html

it tells me that for building this downloaded library i need to type
this on my terminal

shell> cmake -G "Unix Makefiles"

which meant i had to download cmake. But after downloading cmake with
command line capabilities, and i typed this command within that
directory it came up with the error that CMakelists.txt was not found.

My solution was to create a file called 'CMakelists.txt'. I was able to
run this command again with these results logged:

Ivans-MacBook-Pro:mysql-connector-c-6.0.2-osx10.5-x86-64bit 2 inhcheung$
touch CMakeLists.txt
Ivans-MacBook-Pro:mysql-connector-c-6.0.2-osx10.5-x86-64bit 2 inhcheung$
cmake -G "Unix Makefiles"
-- The C compiler identification is GNU 4.2.1
-- The CXX compiler identification is GNU 4.2.1
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag -
yes
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Checking whether CXX compiler has -isysroot
-- Checking whether CXX compiler has -isysroot - yes
-- Checking whether CXX compiler supports OSX deployment target flag
-- Checking whether CXX compiler supports OSX deployment target flag -
yes
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Configuring done
-- Generating done
-- Build files have been written to:
/Users/inhcheung/Documents/mysql-connector-c-6.0.2-osx10.5-x86-64bit 2

I could see that cmake files have been placed on /usr/local as described
in the tutorial.

Now I assume that the mysql C connector has now been built. The next
stage of the tutorial is to install it, which is to type this in the
root shell:

root-shell> make install

I don't know what the root shell is relative to the terminal that I'm
already using, so I assume I just type it out anyway, but the result I
got was not what I expected:

Ivans-MacBook-Pro:mysql-connector-c-6.0.2-osx10.5-x86-64bit 2 inhcheung$
make install
make: *** No rule to make target `install'. Stop

what could be causing this? am I in the correct directory? assuming that
the tutorial wants me to be in the 'MySQL Connector/C source directory'
but I'm not sure where that is. Bear in mind I'm still in where the tar
file was being extracted:

/Users/inhcheung/Documents/mysql-connector-c-6.0.2-osx10.5-x86-64bit 2

I've been stuck on trying to install this connector for a few days so I
really would like some help on this!


Many thanks!

Kind Regards

Ivan Cheung

Options: ReplyQuote


Subject
Views
Written By
Posted
problem with installing mysql c connector for mysql c++ connector
2920
November 07, 2012 04:03PM


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.