HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free and registered users see less advertising! If you just want to browse through the existing questions, just select the forum that you want to visit from the selection below. Otherwise, click here to register!. We highly recommend that you print a copy of our Guide for New Members. Enjoy!

Problems installing MySQL++ wrapper for C++ language

Hi,

I am using Fedora Core 5 32+bit as my os but not using a particular development tool as of now and just sticking to the normal text editor called the KWrite. I am learning C++ and MySQL on my own and want to know if the connection between the two is possible. People say it is and one of my previous question on this very forum also gave me the hint that and I am on the right track by going for the installation of a C++ wrapper called MySQL++ from here.

After downloading the file mysql++-2.2.0.tar.gz (2.6 MB, 2007.01.23) and also untaring/unzipping it on the desktop, a folder called mysql++-2.2.0 was created on the desktop. I went into the folder and read all the readme/install files, but I am no where near a successful installation due to my lack of proper guide to the installation of the same. Can you please help. I have been working on this for quite a while now. Just a few pieces of step by step instruction and the rest will be fine. Thanks.

Use yum to install your packages. Really. Either that or use a thumbdrive to move the actual RPMs over if you cannot use a networked system to the net.

Linux is not like windows really, when it comes to installing software. Linux like to break things into small very specific tools/tasks/utilities and have other software link to that as it needs to. Thus making the software modular and more easily updated when a security flaw needs to be rolled out.

On FC6 (the box I am on now), the command to get the file(s) you need would be a simple (I think that is the package. Install as root, or via sudo or su):

Use yum to install your packages. Really. Either that or use a thumbdrive to move the actual RPMs over if you cannot use a networked system to the net.

Linux is not like windows really, when it comes to installing software. Linux like to break things into small very specific tools/tasks/utilities and have other software link to that as it needs to. Thus making the software modular and more easily updated when a security flaw needs to be rolled out.

On FC6 (the box I am on now), the command to get the file(s) you need would be a simple (I think that is the package. Install as root, or via sudo or su):

Code:

yum install mysql-devel

Hi,

Thanks a lot for the reply. I have already updated MySQL and all the related packages using the yum install mysql* command and also did the yum install mysql-devel command.

The irony now is that I can't find a basic piece of C++ code on the net that can allow me to check whether it is able to establish a connection to MySQL. Although I must mention here that there were some C samples code, like the one here:

but unfamiliarity with the C language does not make it any easier for me to try them out on my own. As far as I know there is a similar type of testing code written in PHP that one can use to make sure whether the PHP code and MySQL connect to each other or not. I am desperate for a sample code that confirms the availability of connection between C++ and MySQL and if not then atleast throws a message "Connection not established". This is the only way I can move forward.

Hope you are getting my problem. Sorry for the long reply, but I am a self starter in the Linux realm and small things do get me stuck. Please get me out of this trouble. Thanks.

Here are a number of links on the web I found from a Google Search for "c++ mysql". There are examples for inserting rows, so you should be able to figure out whether a socket can be opened. Hope it helps.

Here are a number of links on the web I found from a Google Search for "c++ mysql". There are examples for inserting rows, so you should be able to figure out whether a socket can be opened. Hope it helps.