List:MySQL++« Previous MessageNext Message »
From:Keshava Krishna Date:November 11 2009 6:13am
Subject:Re: installing MySql/C++ in ubuntu 9.04
View as plain text  
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
In file included from /usr/local/include/mysql++/sql_buffer.h:32,
                 from /usr/local/include/mysql++/stadapter.h:35,
                 from /usr/local/include/mysql++/qparms.h:35,
                 from /usr/local/include/mysql++/query.h:34,
                 from /usr/local/include/mysql++/mysql++.h:58,
                 from main.cpp:1:
/usr/local/include/mysql++/type_info.h:83: error: expected ‘,’ or
‘...’
before ‘bt’
/usr/local/include/mysql++/type_info.h:98: error: ‘enum_field_types’ does
not name a type
/usr/local/include/mysql++/type_info.h: In constructor
‘mysqlpp::mysql_ti_sql_type_info::mysql_ti_sql_type_info()’:
/usr/local/include/mysql++/type_info.h:71: error: class
‘mysqlpp::mysql_ti_sql_type_info’ does not have any field named
‘base_type_’
/usr/local/include/mysql++/type_info.h:75: error: ‘FIELD_TYPE_NULL’ was not
declared in this scope
/usr/local/include/mysql++/type_info.h: In constructor
‘mysqlpp::mysql_ti_sql_type_info::mysql_ti_sql_type_info(const char*, const
std::type_info&, int)’:
/usr/local/include/mysql++/type_info.h:87: error: class
‘mysqlpp::mysql_ti_sql_type_info’ does not have any field named
‘base_type_’
/usr/local/include/mysql++/type_info.h:87: error: ‘bt’ was not declared in
this scope
/usr/local/include/mysql++/type_info.h:88: error: ‘flags’ was not declared
in this scope
/usr/local/include/mysql++/type_info.h: At global scope:
/usr/local/include/mysql++/type_info.h:168: error: expected `)' before ‘t’
/usr/local/include/mysql++/type_info.h:270: error: ‘enum_field_types’ does
not name a type
/usr/local/include/mysql++/type_info.h:304: error: ‘enum_field_types’ has
not been declared
/usr/local/include/mysql++/type_info.h: In member function ‘const
mysqlpp::mysql_type_info mysqlpp::mysql_type_info::base_type() const’:
/usr/local/include/mysql++/type_info.h:230: error: ‘const class
mysqlpp::mysql_ti_sql_type_info’ has no member named ‘base_type_’
In file included from /usr/local/include/mysql++/stadapter.h:35,
                 from /usr/local/include/mysql++/qparms.h:35,
                 from /usr/local/include/mysql++/query.h:34,
                 from /usr/local/include/mysql++/mysql++.h:58,
                 from main.cpp:1:
/usr/local/include/mysql++/sql_buffer.h: At global scope:
/usr/local/include/mysql++/sql_buffer.h:71: error: ‘string_type’ is not a
member of ‘mysqlpp::mysql_type_info’
/usr/local/include/mysql++/sql_buffer.h:76: error: ‘string_type’ is not a
member of ‘mysqlpp::mysql_type_info’
/usr/local/include/mysql++/sql_buffer.h: In member function ‘bool
mysqlpp::SQLBuffer::is_string()’:
/usr/local/include/mysql++/sql_buffer.h:95: error: ‘string_type’ is not a
member of ‘mysqlpp::mysql_type_info’
In file included from /usr/local/include/mysql++/result.h:35,
                 from /usr/local/include/mysql++/query.h:36,
                 from /usr/local/include/mysql++/mysql++.h:58,
                 from main.cpp:1:
/usr/local/include/mysql++/field.h: At global scope:
/usr/local/include/mysql++/field.h:58: error: expected ‘,’ or
‘...’ before
‘*’ token
/usr/local/include/mysql++/field.h: In constructor
‘mysqlpp::Field::Field(int)’:
/usr/local/include/mysql++/field.h:59: error: ‘pf’ was not declared in this
scope
/usr/local/include/mysql++/field.h:64: error: ‘UNSIGNED_FLAG’ was not
declared in this scope
/usr/local/include/mysql++/field.h:65: error: ‘NOT_NULL_FLAG’ was not
declared in this scope
/usr/local/include/mysql++/field.h: In member function ‘bool
mysqlpp::Field::auto_increment() const’:
/usr/local/include/mysql++/field.h:85: error: ‘AUTO_INCREMENT_FLAG’ was not
declared in this scope
/usr/local/include/mysql++/field.h: In member function ‘bool
mysqlpp::Field::binary_type() const’:
/usr/local/include/mysql++/field.h:88: error: ‘BINARY_FLAG’ was not declared
in this scope
/usr/local/include/mysql++/field.h: In member function ‘bool
mysqlpp::Field::blob_type() const’:
/usr/local/include/mysql++/field.h:91: error: ‘BLOB_FLAG’ was not declared
in this scope
/usr/local/include/mysql++/field.h: In member function ‘bool
mysqlpp::Field::enumeration() const’:
/usr/local/include/mysql++/field.h:97: error: ‘ENUM_FLAG’ was not declared
in this scope
/usr/local/include/mysql++/field.h: In member function ‘bool
mysqlpp::Field::multiple_key() const’:
/usr/local/include/mysql++/field.h:110: error: ‘MULTIPLE_KEY_FLAG’ was not
declared in this scope
/usr/local/include/mysql++/field.h: In member function ‘bool
mysqlpp::Field::primary_key() const’:
/usr/local/include/mysql++/field.h:121: error: ‘PRI_KEY_FLAG’ was not
declared in this scope
/usr/local/include/mysql++/field.h: In member function ‘bool
mysqlpp::Field::set_type() const’:
/usr/local/include/mysql++/field.h:124: error: ‘SET_FLAG’ was not declared
in this scope
/usr/local/include/mysql++/field.h: In member function ‘bool
mysqlpp::Field::timestamp() const’:
/usr/local/include/mysql++/field.h:130: error: ‘TIMESTAMP_FLAG’ was not
declared in this scope
/usr/local/include/mysql++/field.h: In member function ‘bool
mysqlpp::Field::unique_key() const’:
/usr/local/include/mysql++/field.h:136: error: ‘UNIQUE_KEY_FLAG’ was not
declared in this scope
/usr/local/include/mysql++/field.h: In member function ‘bool
mysqlpp::Field::zerofill() const’:
/usr/local/include/mysql++/field.h:139: error: ‘ZEROFILL_FLAG’ was not
declared in this scope
In file included from /usr/local/include/mysql++/row.h:33,
                 from /usr/local/include/mysql++/result.h:40,
                 from /usr/local/include/mysql++/query.h:36,
                 from /usr/local/include/mysql++/mysql++.h:58,
                 from main.cpp:1:
/usr/local/include/mysql++/mystring.h: At global scope:
/usr/local/include/mysql++/mystring.h:197: error: ‘string_type’ is not a
member of ‘mysqlpp::mysql_type_info’
/usr/local/include/mysql++/mystring.h:211: error: ‘string_type’ is not a
member of ‘mysqlpp::mysql_type_info’
/usr/local/include/mysql++/mystring.h:226: error: ‘string_type’ is not a
member of ‘mysqlpp::mysql_type_info’
/usr/local/include/mysql++/mystring.h:243: error: ‘string_type’ is not a
member of ‘mysqlpp::mysql_type_info’
/usr/local/include/mysql++/mystring.h:256: error: ‘string_type’ is not a
member of ‘mysqlpp::mysql_type_info’
/usr/local/include/mysql++/mystring.h:270: error: ‘string_type’ is not a
member of ‘mysqlpp::mysql_type_info’
/usr/local/include/mysql++/mystring.h: In member function
‘mysqlpp::mysql_type_info mysqlpp::String::type() const’:
/usr/local/include/mysql++/mystring.h:450: error: ‘string_type’ is not a
member of ‘mysqlpp::mysql_type_info’
/usr/local/include/mysql++/mystring.h: In member function ‘mysqlpp::String&
mysqlpp::String::operator=(const std::string&)’:
/usr/local/include/mysql++/mystring.h:458: error: ‘string_type’ is not a
member of ‘mysqlpp::mysql_type_info’
/usr/local/include/mysql++/mystring.h: In member function ‘mysqlpp::String&
mysqlpp::String::operator=(const char*)’:
/usr/local/include/mysql++/mystring.h:471: error: ‘string_type’ is not a
member of ‘mysqlpp::mysql_type_info’
In file included from /usr/local/include/mysql++/result.h:40,
                 from /usr/local/include/mysql++/query.h:36,
                 from /usr/local/include/mysql++/mysql++.h:58,
                 from main.cpp:1:
/usr/local/include/mysql++/row.h: At global scope:
/usr/local/include/mysql++/row.h:137: error: expected `)' before ‘row’
In file included from /usr/local/include/mysql++/query.h:36,
                 from /usr/local/include/mysql++/mysql++.h:58,
                 from main.cpp:1:
/usr/local/include/mysql++/result.h:168: error: expected `)' before ‘*’
token
/usr/local/include/mysql++/result.h:231: error: expected `)' before ‘*’
token
/usr/local/include/mysql++/result.h:281: error: ‘MYSQL_RES’ was not declared
in this scope
/usr/local/include/mysql++/result.h:281: error: template argument 1 is
invalid
/usr/local/include/mysql++/result.h:308: error: expected `)' before ‘*’
token
/usr/local/include/mysql++/result.h:354: error: ‘MYSQL_ROW’ does not name a
type
/usr/local/include/mysql++/result.h:385: error: expected type-specifier
before ‘MYSQL_RES’
/usr/local/include/mysql++/result.h:401: error: ‘MYSQL_RES’ was not declared
in this scope
/usr/local/include/mysql++/result.h:401: error: template argument 1 is
invalid
/usr/local/include/mysql++/result.h:401: error: template argument 2 is
invalid
In file included from /usr/local/include/mysql++/mysql++.h:58,
                 from main.cpp:1:
/usr/local/include/mysql++/query.h: In member function ‘void
mysqlpp::Query::storein_sequence(Sequence&, const
mysqlpp::SQLTypeAdapter&)’:
/usr/local/include/mysql++/query.h:750: error: ‘MYSQL_ROW’ was not declared
in this scope
/usr/local/include/mysql++/query.h:750: error: expected `;' before ‘d’
/usr/local/include/mysql++/query.h:751: error: ‘d’ was not declared in this
scope
/usr/local/include/mysql++/query.h:753: error: ‘d’ was not declared in this
scope
/usr/local/include/mysql++/query.h: In member function ‘void
mysqlpp::Query::storein_set(Set&, const mysqlpp::SQLTypeAdapter&)’:
/usr/local/include/mysql++/query.h:808: error: ‘MYSQL_ROW’ was not declared
in this scope
/usr/local/include/mysql++/query.h:808: error: expected `;' before ‘d’
/usr/local/include/mysql++/query.h:809: error: ‘d’ was not declared in this
scope
/usr/local/include/mysql++/query.h:811: error: ‘d’ was not declared in this
scope
root@kk-desktop:~/kini#

'm not finding a way out :(

Regards,
Keshava.
+919449554001


On Wed, Nov 11, 2009 at 11:29 AM, Nick Hastings <hastings@stripped>wrote:

> Hi,
>
> sorry, have not really been following this thread... but better late
> then never.
>
> * Keshava Krishna <keshavkrishna88@stripped> [091111 13:44]:
> > Let me be precise,
> > this is my code
> >
> > #include </usr/local/include/mysql++/mysql++.h>
> > #include <iostream>
> >
> > int main(int argc, char** argv)
> > {
> >
> > }
>
> From the subject it seems you are using Ubuntu, but from your first
> #include above it seems you installed mysql++ by hand.
>
>
> > and i have include following runtime search paths
> > /usr/lib, /usr/local/mysql/lib, /usr/local/lib
> >
> >
> > On Wed, Nov 11, 2009 at 10:02 AM, Keshava Krishna <
> keshavkrishna88@stripped
> > > wrote:
> >
> > > By ../lib i mean all lib directories...
> > > and 'm using netbeans. I have included these directories in project
> > > properties.
>
> Ouch, netbeans?
>
> Why not remove that from the equation and start trying to compile
> normally and see how that goes.
>
> Please put the following in a file called foo.cc
>
> #include "mysql++/mysql++.h"
> int main(int argc, char** argv)
> {
> }
>
>
> Then try to compile with
>
> g++ -I/usr/local/include foo.cc
>
> We can build from there.
>
> HTH,
>
> Nick.
>
>
>
>
>
> > > Sorry for misleading you.
> > >
> > > Regards,
> > > Keshava.
> > > +919449554001
> > >
> > >
> > >
> > > On Wed, Nov 11, 2009 at 9:21 AM, Warren Young <mysqlpp@stripped>
> wrote:
> > >
> > >> Keshava Krishna wrote:
> > >>
> > >>> and i have included the ../lib directories
> > >>>
> > >>
> > >> What is your exact compilation command?  It worries me that you're
> > >> apparently using relative paths.  If you mean ".." as a kind of wild
> card,
> > >> don't do that.  ".." means something specific.
> > >>
> > >>
> > >> --
> > >> MySQL++ Mailing List
> > >> For list archives: http://lists.mysql.com/plusplus
> > >> To unsubscribe:
> > >> http://lists.mysql.com/plusplus?unsub=1
> > >>
> > >>
> > >
>
> --
> MySQL++ Mailing List
> For list archives: http://lists.mysql.com/plusplus
> To unsubscribe:
> http://lists.mysql.com/plusplus?unsub=1
>
>

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