List:MySQL++« Previous MessageNext Message »
From:Graham Reitz Date:December 2 2007 5:01pm
Subject:Re: Annoying question from a noob
View as plain text  
Hi Michael,

I think on Linux mysql++ will install in the /usr/local/lib and usr/ 
local/include directories. I would recommend just downloading it from  
the main site and follow the directions in the README.unix file.  The  
mysqlpp make install is fairly harmless.

As far as linking goes.   Make sure that you have the -L /mysqlpp/link/ 
path as well as the -L /mysqlclient/link/path sent to g++.  Use -lz - 
lmysqlclient_r -lmysqlpp also and you should be ok for linking (small  
"el").  It also looks like the header paths are not set up right.  You  
will need -I /path/to/mysqlpp/headers (that's a capital "eye").

I think that it's.

Good luck,
graham


On Dec 2, 2007, at 9:28 AM, Michael Sullivan wrote:

> 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?
>
>
> -- 
> MySQL++ Mailing List
> For list archives: http://lists.mysql.com/plusplus
> To unsubscribe:    http://lists.mysql.com/plusplus?unsub=1
>

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