LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Problem with (instalation of?) mysql.h on c (https://www.linuxquestions.org/questions/linux-newbie-8/problem-with-instalation-of-mysql-h-on-c-4175544310/)

b4str1 06-02-2015 07:14 PM

Problem with (instalation of?) mysql.h on c
 
Hi, I've just recently installed MySQL connector/c from source code on my Slackware 14.1 x64

I read the official instructions of the connector but I felt a bit disorientated when I read:
Code:

1 -Change location to the top-level directory of the source distribution.
I interpreted that I have to go to the "highest" directory
Code:

/
So I wrote:
Code:


        #                            cd /

root@- /#                            tar xzvf /home/normal/Downloads/mysql-connector-c-6.1.6-src.tar.gz

root@- /#                            cd /mysql-connector-c-6.1.6-src/

root@- /mysql-connector-c-6.1.6-src# cmake -G "Unix Makefiles"

root@- /mysql-connector-c-6.1.6-src# make

root@- /mysql-connector-c-6.1.6-src# make install

Then I did:
Code:

ln -s /usr/local/mysql-5.6.25/include /usr/include
But when I try to compile a program in c with #include <mysql.h> i get this error:
Code:

# gcc ctemp.c
In file included from ctemp.c:2:0:
/usr/include/mysql.h:57:27: fatal error: mysql_version.h: No such file or directory
 #include "mysql_version.h"
                          ^

What can I do? Thanks a lot and sorry for poor english

PD: If you need the official instructions I paste here the link: https://dev.mysql.com/doc/connector-...on-source.html

c0d3d 06-02-2015 07:43 PM

According to the instructions, mysql is installed to '/usr/local/mysql', not 'usr/local/mysql-5.6.25'.

b4str1 06-02-2015 08:04 PM

Quote:

Originally Posted by c0d3d (Post 5371259)
According to the instructions, mysql is installed to '/usr/local/mysql', not 'usr/local/mysql-5.6.25'.

Yes but I made a Symbolic Link from /usr/local/mysql-5.6.25 to /usr/local/mysql when I installed MySQL


All times are GMT -5. The time now is 12:01 PM.