Push Pull2014-04-25 19:45:55
Push Pull, 2014-04-25 19:45:55

ANSI C - How to connect to MySQL?

Interested in actually installing the MySQL Connector (or something else that will help connect to the database). Ran around the site dev.mysql found only rpm packages. I have ubuntu, with linux in a difficult relationship, but it just so happened. I downloaded the raw files, I don’t see makefil, I see cmake, I make a cmake error

CMake Error at cmake/FindMySQL.cmake:329 (MESSAGE):
  mysql_config wasn't found, -DMYSQL_CONFIG_EXECUTABLE=...
Call Stack (most recent call first):
  CMakeLists.txt:105 (INCLUDE)

CMake Error at cmake/FindMySQL.cmake:331 (MESSAGE):
  Cannot find MySQL.  Include dir: MYSQL_INCLUDE_DIR-NOTFOUND library dir:
Call Stack (most recent call first):
  CMakeLists.txt:105 (INCLUDE)

Can anyone tell me the easiest way to connect to the database? Or help me figure out what I'm doing wrong.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Rsa97, 2014-04-26

Try including <mysql/mysql.h>. If the file does not exist, then install the libmysqlclient-dev package

AxisPod, 2014-04-25

And it is necessary to collect from outcomes? In the packages lies after all, everything is already assembled. mysql-client or something like that.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question