Ok, now I tried the following command:
c++ main.C -lmysqlpp -I /usr/local/include/mysql++
Code:
~/c++> c++ main.C -lmysqlpp -I /usr/local/include/mysql++
In file included from /usr/local/include/mysql++/connection.h:40,
from /usr/local/include/mysql++/mysql++.h:52,
from main.C:1:
/usr/local/include/mysql++/defs.h:34:19: error: mysql.h: No such file or directory
/usr/local/include/mysql++/defs.h:66: error: ‘MYSQL_FIELD’ does not name a type
/usr/local/include/mysql++/connection.h:146: error: ‘my_bool’ has not been declared
/usr/local/include/mysql++/connection.h:163: error: ‘my_bool’ has not been declared
/usr/local/include/mysql++/connection.h:360: error: ‘st_mysql_options’ does not name a type
/usr/local/include/mysql++/connection.h:427: error: ‘my_ulonglong’ does not name a type
/usr/local/include/mysql++/connection.h:438: error: ‘my_ulonglong’ does not name a type
/usr/local/include/mysql++/connection.h:488: error: ‘mysql_option’ has not been declared
/usr/local/include/mysql++/connection.h:545: error: ‘MYSQL’ does not name a type
/usr/local/include/mysql++/connection.h: In member function ‘void mysqlpp::Connection::close()’:
/usr/local/include/mysql++/connection.h:171: error: ‘mysql_’ was not declared in this scope
/usr/local/include/mysql++/connection.h:171: error: ‘mysql_close’ was not declared in this scope
/usr/local/include/mysql++/connection.h: In member function ‘const char* mysqlpp::Connection::error()’:
/usr/local/include/mysql++/connection.h:228: error: ‘mysql_’ was not declared in this scope
/usr/local/include/mysql++/connection.h:228: error: ‘mysql_error’ was not declared in this scope
/usr/local/include/mysql++/connection.h: In member function ‘int mysqlpp::Connection::errnum()’:
/usr/local/include/mysql++/connection.h:235: error: ‘mysql_’ was not declared in this scope
/usr/local/include/mysql++/connection.h:235: error: ‘mysql_errno’ was not declared in this scope
/usr/local/include/mysql++/connection.h: In member function ‘int mysqlpp::Connection::refresh(unsigned int)’:
/usr/local/include/mysql++/connection.h:247: error: ‘mysql_’ was not declared in this scope
.....
I get the impression this has nothing to do with my main.C program, because main.C looks like this
Code:
#include <mysql++.h>
#include <iostream>
#include <iomanip>
using namespace std;
int main(int argc, char *argv[])
{
return 0;
}
Any suggestion where all the errors come from ?
Luca
ps mysql.h is located at /usr/include