List:MySQL++« Previous MessageNext Message »
From:Christophe-Marie Duquesne Date:July 10 2008 7:40am
Subject:Re: Need help for compiling : ‘Trans action’ is not a member of ‘mysqlpp’
View as plain text  
I have to precise I am on debian stable.

$ apt-cache show libmysql++-dev
Package: libmysql++-dev
Priority: optional
Section: libdevel
Installed-Size: 5768
Maintainer: Athena Capital Research <acr-debian@stripped>
Architecture: i386
Source: mysql++
Version: 2.0.7-3
Replaces: libsqlplus-dev
Depends: libmysql++2c2a (= 2.0.7-3), libmysqlclient15-dev
Conflicts: libsqlplus-dev
Filename: pool/main/m/mysql++/libmysql++-dev_2.0.7-3_i386.deb
Size: 1711552
MD5sum: b937ff95649211955778fe6165ea602a
SHA1: ca96174fdc74b429a837dc4aa43fc237ca69476e
SHA256: 34d7dd2c23805de2a7dc107a8098f5af7605f18bda942d57b6b1ce83acf6363c
Description: mysql C++ library bindings (development)
 Mysql++ is a complex C++ API for Mysql (And other SQL Databases
 Soon). The goal of this API is too make working with Queries as easy
 as working with other STL Containers.
 .
 This package provides development support.
 .
 Homepage: http://tangentsoft.net/mysql++/.
Tag: devel::lang:sql, devel::library, works-with::db

Is my version too old?

On Thu, Jul 10, 2008 at 9:27 AM, Christophe-Marie Duquesne <
chm.duquesne@stripped> wrote:

> Hi,
>
> I get this error when compiling :
> 43: error: 'Transaction' is not a member of 'mysqlpp'
>
> I don't understand why.
> In the corresponding cpp file, line 43, I declare :
> mysqlpp::Transaction trans(con); // con is a Connection I constructed
> before
>
> In the .h, I have
> #include <mysql++/mysql++.h>
> using namespace mysqlpp;
>
> As I use the 'using namespace mysqlpp' directive, I know I should not need
> to declare trans as a mysqlpp::Transaction. Transaction should be enough.
> Here is what happens if I remove the 'mysqlpp::'.
> 43: error: 'Transaction' was not declared in this scope
>
> Honestly I don't understand what's happening. I have the feeling g++ thinks
> mysqlpp is not a namespace but a class. Could you help me please?
>
> Regards,
> Christophe-Marie Duquesne
>
> PS :
> Less interesting, but for information, here are my compilation options in
> my Makefile :
> #The important part
> MYSQLINCFLAGS  = -I/usr/include/mysql -I/usr/include/mysql++
> MYSQLLNFLAGS   = -L/usr/lib/mysql -L/usr/local/lib/mysql++ -lmysqlpp
>
> #just in case you want to check if there is something odd
> EXEC           = projet
> LDFLAGS        = $(MYSQLLNFLAGS) $(otherlinkflags)
> CXXFLAGS       = $(MYSQLINCFLAGS) $(otherincludeflags)
> SRC            = $(wildcard *.cpp)
> OBJ            = $(SRC:.cpp=.o)
> all: $(EXEC)
> projet: $(OBJ)
>      $(CPP) -o $@ $^ $(LDFLAGS)
>  %.o: %.cpp
>      $(CPP) -o $@ -c $< $(CXXFLAGS)
>
>


-- 
Christophe-Marie Duquesne
élève ingénieur 2A ensimag
Thread
Need help for compiling : ‘Transac tion’ is not a member of ‘mysqlpp’Christophe-Marie Duquesne10 Jul
  • Re: Need help for compiling : ‘Trans action’ is not a member of ‘mysqlpp’Christophe-Marie Duquesne10 Jul
    • Re: Need help for compiling : ‘Trans action’ is not a member of ‘mysqlpp’Christophe-Marie Duquesne10 Jul
      • Re: Need help for compiling : ‘Trans action’ is not a member of ‘mysqlpp’Christophe-Marie Duquesne10 Jul
        • Re: Need help for compiling : ‘Transaction’ is not a member of ‘mysqlpp’Warren Young10 Jul
          • Re: Need help for compiling : ‘Trans action’ is not a member of ‘mysqlpp’Christophe-Marie Duquesne10 Jul