List:MySQL++« Previous MessageNext Message »
From:Nick Hastings Date:November 11 2009 6:26am
Subject:Re: installing MySql/C++ in ubuntu 9.04
View as plain text  
Hi,

please just reply to the list, not me.

* Keshava Krishna <keshavkrishna88@stripped> [091111 15:19]:
> Thanks Nick,
> I tried what u suggested,
> 
> but i got the same errors..
> root@kk-desktop:~/kini# g++ -I/usr/local/include main.cpp
> In file included from /usr/local/include/mysql++/connection.h:38,
>                  from /usr/local/include/mysql++/mysql++.h:56,
>                  from main.cpp:1:
> /usr/local/include/mysql++/common.h:124:28: error: mysql_version.h: No such
> file or directory
> /usr/local/include/mysql++/common.h:182:20: error: mysql.h: No such file or
> directory


Now we are getting somewhere. So where did you install libmysql?
Ie where is mysql_version.h? Assuming you installed it in /usr/local/,
I guess the file would be at /usr/local/include/mysql/mysql.h.

Hint: you can probably use the "locate" comand to find it.

%locate mysql.h

Failing that:

% find / -name mysql.h

You have to tell the compiler where to look for the included files using the -I
flag. Assuming both mysq_version.h and mysql.h are in /usr/include/mysql
put the following code in a file... lets call it bar.cc

#include "mysql++.h"
{
}

Compile with:

g++ -I/usr/local/include/mysql++ -I/usr/local/include/mysql bar.cc

Nick.
Thread
installing MySql/C++ in ubuntu 9.04Keshava Krishna7 Nov
  • Re: installing MySql/C++ in ubuntu 9.04Warren Young9 Nov
    • Re: installing MySql/C++ in ubuntu 9.04Keshava Krishna10 Nov
      • Re: installing MySql/C++ in ubuntu 9.04Warren Young11 Nov
        • Re: installing MySql/C++ in ubuntu 9.04Keshava Krishna11 Nov
          • Re: installing MySql/C++ in ubuntu 9.04Keshava Krishna11 Nov
            • Re: installing MySql/C++ in ubuntu 9.04Nick Hastings11 Nov
              • Re: installing MySql/C++ in ubuntu 9.04Keshava Krishna11 Nov
                • Re: installing MySql/C++ in ubuntu 9.04Nick Hastings11 Nov
                • Re: installing MySql/C++ in ubuntu 9.04Warren Young11 Nov
            • Re: installing MySql/C++ in ubuntu 9.04Warren Young11 Nov
          • Re: installing MySql/C++ in ubuntu 9.04Warren Young11 Nov