List:MySQL++« Previous MessageNext Message »
From:Adrian Cornish Date:August 22 2011 7:47pm
Subject:Re: MySQL++ not working with libstdc++6
View as plain text  
On Mon, Aug 22, 2011 at 11:13 AM, Warren Young <mysqlpp@stripped> wrote:

> On 8/22/2011 8:59 AM, Adrian Cornish wrote:
>
>>
>> I'll download Ubuntu to see if I can reproduce it.
>>
>
> It may be important that this is on Ubuntu 10.4 LTS, and the current stable
> source release rather than what is in the Ubuntu package repo.
>
> That could also explain why no one else is complaining about this: I
> suspect most of our Ubuntu users aren't still on the LTS branch, and are
> either using the packaged MySQL++ (3.0.9 still) or svn.
>
> Ina: have you tried the svn version?
>

Ina,

I cannot reproduce you issue - can you check the details below and see if I
have missed anything?

I downloaded and installed
adrian@unbuntu:~$ uname -a
Linux unbuntu 2.6.32-33-generic #70-Ubuntu SMP Thu Jul 7 21:13:52 UTC 2011
x86_64 GNU/Linux

I tried mysqlpp 3.0.9 from ubuntu packages and its worked fine.

I removed 3.0.9 and installed 3.1.0 from source and it worked fine as well

Out of interest - what does this version code do on you box
adrian@unbuntu:~$ g++ -o version version.cc -I/usr/local/include -lmysqlpp
`mysql_config --include --libs`
adrian@unbuntu:~$ ./version
adrian@unbuntu:~$ cat version.cc
#include <mysql++/mysql++.h>

int main()
{
   if(mysqlpp::get_library_version()!=MYSQLPP_HEADER_VERSION)
   {
      std::cout << "Library/header mismatch\n";
   }
   return 0;
}


Detailed results of my testings

adrian@unbuntu:~$ g++ --version
g++ (Ubuntu 4.4.3-4ubuntu5) 4.4.3
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

adrian@unbuntu:~$ ls -l /usr/lib64/libstdc++.so.6.0.13
-rw-r--r-- 1 root root 1044112 2010-03-26 18:16
/usr/lib64/libstdc++.so.6.0.13
adrian@unbuntu:~$ grep MYSQLPP_HEADER_VERSION /usr/include/mysql++/mysql++.h

#define MYSQLPP_HEADER_VERSION MYSQLPP_VERSION(3, 0, 9)
/// MYSQLPP_HEADER_VERSION constant in order to ensure that your
adrian@unbuntu:~$ cat simple.cc
#include <mysql++.h>
#include <iostream>

using namespace std;

int main()
{
   std::cout << "Version: " << mysqlpp::get_library_version() <<
std::endl;
   mysqlpp::Connection conn(false);
   if (conn.connect("mysql_cpp_data", "localhost", "adrian", "", 3306)) {
   // Retrieve a subset of the sample stock table set up by resetdb
   // and display it.
      mysqlpp::Query query = conn.query("SELECT * from stock");
   } else {
      cerr << "DB connection failed: " << conn.error() << endl;
      return 1;
   }

   return 1;
}
adrian@unbuntu:~$ g++ -o simple simple.cc -I/usr/include/mysql++
`mysql_config --libs --include` -lmysqlpp
adrian@unbuntu:~$ ./simple
Version: 196617
adrian@unbuntu:~$

adrian@unbuntu:~$ sudo ldconfig -p | grep mysql
    libmysqlpp.so.3 (libc6,x86-64) => /usr/local/lib/libmysqlpp.so.3
    libmysqlpp.so (libc6,x86-64) => /usr/local/lib/libmysqlpp.so
    libmysqlclient_r.so.16 (libc6,x86-64) => /usr/lib/libmysqlclient_r.so.16
    libmysqlclient_r.so (libc6,x86-64) => /usr/lib/libmysqlclient_r.so
    libmysqlclient.so.16 (libc6,x86-64) => /usr/lib/libmysqlclient.so.16
    libmysqlclient.so (libc6,x86-64) => /usr/lib/libmysqlclient.so
adrian@unbuntu:~$ grep MYSQLPP_HEADER_VERSION
/usr/local/include/mysql++/mysql++.h
#define MYSQLPP_HEADER_VERSION MYSQLPP_VERSION(3, 1, 0)
/// MYSQLPP_HEADER_VERSION constant in order to ensure that your
adrian@unbuntu:~$ g++ -o simple simple.cc -I/usr/local/include/mysql++
`mysql_config --libs --include` -lmysqlpp
adrian@unbuntu:~$ ./simple
Version: 196864
adrian@unbuntu:~$

Thread
MySQL++ not working with libstdc++6Ina J.19 Aug
  • Re: MySQL++ not working with libstdc++6Linda Messerschmidt19 Aug
    • Re: MySQL++ not working with libstdc++6Jonathan Wakely19 Aug
      • Re: MySQL++ not working with libstdc++6Ina J.21 Aug
        • Re: MySQL++ not working with libstdc++6Ina J.22 Aug
          • Re: MySQL++ not working with libstdc++6Adrian Cornish22 Aug
            • Re: MySQL++ not working with libstdc++6Warren Young22 Aug
              • Re: MySQL++ not working with libstdc++6Adrian Cornish22 Aug
                • Re: MySQL++ not working with libstdc++6Ina J.23 Aug
                  • Re: MySQL++ not working with libstdc++6Ina J.23 Aug
                    • Re: MySQL++ not working with libstdc++6Jonathan Wakely23 Aug
                      • Re: MySQL++ not working with libstdc++6Ina J.23 Aug