Problem solved. I think my version is too old.
I am going to handle transactions with queries.
For later, I'll remember to always look at the documentation in
/usr/share/doc and not the one on the web
On Thu, Jul 10, 2008 at 10:14 AM, Christophe-Marie Duquesne <
> grep -R Transaction /usr/include/mysql++/
> No result. Did I install mysql++ wrong? Is the version too old?
> On Thu, Jul 10, 2008 at 9:40 AM, Christophe-Marie Duquesne <
> chm.duquesne@stripped> wrote:
>> 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 <firstname.lastname@example.org>
>> 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:
>>> 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
>>> 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?
>>> 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)
>> élève ingénieur 2A ensimag
> Christophe-Marie Duquesne
> élève ingénieur 2A ensimag
élève ingénieur 2A ensimag