List:MySQL++« Previous MessageNext Message »
From:ddneilson Date:December 2 2007 6:39pm
Subject:Re: Annoying question from a noob
View as plain text  
Michael Sullivan wrote:
<snip>
> OK.  I've installed it from source and run ldconfig.  It's in /usr/local
> now.  When I try to build simple1.cpp however:
>
> michael@camille examples $ g++ simple1.cpp -lz -lmysqlclient_r -lmysqlpp
> -I/usr/local/include/mysql++/ -o simple
> In file included from /usr/local/include/mysql++/connection.h:38,
>                  from /usr/local/include/mysql++/mysql++.h:56,
>                  from util.h:31,
>                  from simple1.cpp:28:
> /usr/local/include/mysql++/common.h:37:27: error: mysql_version.h: No
> such file or directory
> /usr/local/include/mysql++/common.h:148:19: error: mysql.h: No such file
> or directory
>   
<snip>

 I've encountered the same problem. The solution is to also include the 
header path "/usr/include/mysql" to your compile options. The path might 
be different from that, depending on your setup; the main thing is to 
find the directory containing "mysql.h" and "mysql_version.h" (should be 
the same place), and include that directory as well as a -I (capital 
eye) option.

-Daniel
Thread
Annoying question from a noobMichael Sullivan2 Dec
  • Re: Annoying question from a noobGraham Reitz2 Dec
    • Re: Annoying question from a noobMichael Sullivan2 Dec
      • Re: Annoying question from a noobddneilson2 Dec
      • Re: Annoying question from a noobWilliam F. Dowling2 Dec
        • Re: Annoying question from a noobMichael Sullivan2 Dec
          • Re: Annoying question from a noobGraham Reitz2 Dec
          • Re: Annoying question from a noobWarren Young3 Dec
            • Re: Annoying question from a noobKun Niu3 Dec
              • Re: Annoying question from a noobWarren Young3 Dec