#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2006
    Posts
    73
    Rep Power
    9

    Mysql.h: No such file or directory


    Linux server, gcc ver 4.1.2, and MySQL ver 14.12 distrib 5.0.22
    When I include in my my_prg.c the line "#include <mysql.h>;" I get the compile error: "mysql.h: No such file or directory". my_prg.c compiles and runs without error if I eliminate the "#include <mysql.h>". As far as I can tell, mysql.h does not exist on the server. It is not in /usr/include/.
    MySQL is obviously running on the server because I just checked the website that accesses the database often and it works. MySQL Query Browser also works like it should. mysql works at the command prompt via putty.

    Any suggestions? Is this the correct forum to look for help for this problem?

    Thanks, John
  2. #2
  3. No Profile Picture
    I haz teh codez!
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Dec 2003
    Posts
    2,549
    Rep Power
    2337
    You need to install the mysql-devel package for your platform.

    Comments on this post

    • johnabrown agrees : ptr2void's suggestion solved the problem!
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2013
    Posts
    1
    Rep Power
    0
    I've tested with this command:

    g++ -o UpdatePHPIPAM UpdatePHPIPAM.c `mysql_config --cflags --libs`

    I'm from Peru and I have a bit experience with c++. I hope this helps. good luck guys.
  6. #4
  7. Contributing User
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jan 2003
    Location
    USA
    Posts
    7,184
    Rep Power
    2222
    You arrived five years too late. Try arriving on time from now on.

IMN logo majestic logo threadwatch logo seochat tools logo