Question

I want to connect to a MySQL database from a c++ program. I've installed the mysql server and configured it. I've also installed a mysql c++ connector.

Everything is ok but I do not know how to include the libraries to the project so I can compile it. I use Eclipse Indigo with the C\C++ perspective.

The code for testing is it work I've got it from this site : Connector example

Was it helpful?

Solution

If you need to add an include directory (where your header files are located) then in the Eclipse menu go to Project->Properties then open the C/C++ Build branch and click on Settings. On the right side click on the Directories branch of GCC C Compiler. You can then add directories to your include path.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top