List:MySQL++« Previous MessageNext Message »
From:Dovid Kopel Date:November 10 2004 5:06pm
Subject:Re: Can't run examples by themselves
View as plain text  
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Almost there...this is getting long, I guess this is why we use Makefile
s :). Thanks for all the help!

munky@lappy ~/examples $ g++ -I/usr/include/mysql
- -I/usr/include/mysql++-o simple simple1.cc -lmysqlpp -lmysqlclient
/tmp/cckdegra.o(.text+0x3a): In function `main':
: undefined reference to `connect_sample_db(int, char**,
mysqlpp::Connection&, char const*)'
collect2: ld returned 1 exit status

- -=mUnky=-
- -Dovid Kopel
(516)-655-0489
munky@stripped
http://www.munkys.com


Bryan W. Headley wrote:
| Chris Frey wrote:
|
|> On Wed, Nov 10, 2004 at 01:28:36PM +0000, Dovid Kopel wrote:
|>
|>
|>> -----BEGIN PGP SIGNED MESSAGE-----
|>> Hash: SHA1
|>>
|>> Chris-
|>>
|>> I unemerge and remerged there is one instance of the headers. I'm
|>> confused.
|>>
|>> munky@lappy ~/examples $ g++ -I/usr/include/mysql -I/usr/include/mysql++
|>> - -o simple simple1.cc
|>> /tmp/cc0ZhRu5.o(.text+0x3a): In function `main':
|>> : undefined reference to `connect_sample_db(int, char**,
|>> mysqlpp::Connection&, char const*)'
|>>
|>
|>
|> This is getting closer, but whoops, I forgot to recommend you add
|> -lmysqlpp
|> in order to link with the right library.
|>
|> g++ -I/usr/include/mysql -I/usr/include/mysql++ -o simple simple1.cc
|> -lmysqlpp
|>
|>
|>
| That would help. Also tell it to link in the mysqlclient library.
|
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBkkqoCecRKprSbsERAtSCAJ45rnRtkiWJZn8aMlcc3i4zDc1teACfR1ZS
12GZIHdKTGm8T0NYGnHOxVE=
=i8Ef
-----END PGP SIGNATURE-----

Thread
Can't run examples by themselvesDovid Kopel10 Nov
  • Re: Can't run examples by themselvesChris Frey10 Nov
    • Re: Can't run examples by themselvesDovid Kopel10 Nov
      • Re: Can't run examples by themselvesChris Frey10 Nov
        • Re: Can't run examples by themselvesBryan W. Headley10 Nov
          • Re: Can't run examples by themselvesDovid Kopel10 Nov
            • Re: Can't run examples by themselvesWarren Young10 Nov
    • Re: Can't run examples by themselvesWarren Young10 Nov