List:MySQL++« Previous MessageNext Message »
From:Michael Sullivan Date:December 2 2007 3:28pm
Subject:Annoying question from a noob
View as plain text  
I know you'll hate me for this.  I blame my own inexperience and
ignorance for having to ask this here, but I can't figure out how to
link to mysql++ library.  I emerged mysql++ on my Gentoo system.  I
cannot figure out where it put the example programs, if it even built
them.  I didn't even have the exrun script until I downloaded the source
tarball from the website and built it in my home directory.  I did not
do a make install, as that might conflict with the full-system install
of the package.  The website said that programs that use mysql++ must be
linked with libmysqlpp and libmysqlclient (I did a locate on mysqlclient
and I have mysqlclient_r.so)  Here's the output from my build attempt:

michael@camille examples $ g++ simple1.cpp -lmyslpp -lmysqlclient_r
In file included from simple1.cpp:28:
util.h:31:21: error: mysql++.h: No such file or directory
util.h:36: error: expected ',' or '...' before '::' token
util.h:36: error: ISO C++ forbids declaration of 'mysqlpp' with no type
util.h:37: error: expected ',' or '...' before '::' token
util.h:39: error: ISO C++ forbids declaration of 'mysqlpp' with no type
util.h:40: error: variable or field 'print_stock_rows' declared void
util.h:40: error: 'mysqlpp' has not been declared
util.h:40: error: 'res' was not declared in this scope
util.h:41: error: variable or field 'print_stock_table' declared void
util.h:41: error: 'mysqlpp' has not been declared
util.h:41: error: 'query' was not declared in this scope
util.h:42: error: variable or field 'get_stock_table' declared void
util.h:42: error: 'mysqlpp' has not been declared
util.h:42: error: 'query' was not declared in this scope
util.h:42: error: 'mysqlpp' has not been declared
util.h:42: error: 'res' was not declared in this scope
util.h:42: error: initializer expression list treated as compound
expression
util.h:45: error: 'mysqlpp' has not been declared
util.h:45: error: expected ',' or '...' before '&' token
simple1.cpp: In function 'int main(int, char**)':
simple1.cpp:41: error: 'mysqlpp' has not been declared
simple1.cpp:41: error: expected `;' before 'con'
simple1.cpp:42: error: 'con' was not declared in this scope
simple1.cpp:47: error: 'mysqlpp' has not been declared
simple1.cpp:47: error: expected `;' before 'query'
simple1.cpp:48: error: 'query' was not declared in this scope
simple1.cpp:49: error: 'mysqlpp' has not been declared
simple1.cpp:49: error: expected `;' before 'res'
simple1.cpp:53: error: 'res' was not declared in this scope
simple1.cpp:54: error: 'mysqlpp' has not been declared
simple1.cpp:54: error: expected `;' before 'row'
simple1.cpp:55: error: 'mysqlpp' has not been declared
simple1.cpp:55: error: expected `;' before 'i'
simple1.cpp:56: error: 'i' was not declared in this scope
simple1.cpp:56: error: 'row' was not declared in this scope

What am I doing wrong here?

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