Hi Mateusz, Thanks a lot for your answer to this thread.
Finally I managed to get rid of the Debian SOCI 2.2 version and to compile and install the version 3.0 supporting the sqlite-backend. For other newbies: They can find a short how-to about compiling SOCI 3 with sqlite-backend on http://maus.chaosnet.ch/?p=106. Thanks for soci and your support. kind regards maurus Mateusz Loskot schrieb: > M. Frey wrote: >> Hi, >> >> I'm using SOCI 2.2 installed from deb.packages (libsoci-core-gcc-dev >> etc.). I'm not able to use Ver. 3 because I need the sqlite back-end. > > Understood. Unfortunately, due to limited number of people working on > the library, we were not able to maintain the SQLite3 backend. > I hope to change it in near future. > >> I would like to use dynamic binding and Object-relational mapping >> with version 2.2. To check out if it works, I used the sample in the >> documentation: >> http://soci.sourceforge.net/doc/exchange.html#object_relational > > Do you mean "the Person" example? > It won't work. The reason is as simple as the fact that documentation on > the website is based on most recent release of SOCI 3.0.0. > SOCI 3 is not compatible with SOCI 2. > >> What a surprise: I got some errors while compiling the test file: >> >> Invoking: GCC C++ Compiler g++ -O0 -g3 -Wall -c -fmessage-length=0 >> -MMD -MP -MF"main.d" -MT"main.d" -o"main.o" "../main.cpp" >> ../main.cpp:22: error: 'TypeConversion' is not a template >> ../main.cpp:22: error: explicit specialization of non-template >> 'soci::TypeConversion' make: *** [main.o] Error 1 > > Simply, it's not recognized as a template because now it lives in > different namespace, soci. In SOCI 2.x the namespace is SOCI. > It's one of the major changes. > >> After trying around I found out, that I have to declare the SOCI >> namespace in upper-case letters in order that 'TypeConversion' will >> be recognized as a template. > > Right. > >> Also the type "Values" has to be written with upper-case V in order >> to be recognized. > > Yes. Again, for the same reasons. > >> Now I got the following errors: g++ -O0 -g3 -Wall -c >> -fmessage-length=0 -MMD -MP -MF"main.d" -MT"main.d" -o"main.o" >> "../main.cpp" ../main.cpp:25: error: 'indicator' has not been >> declared ../main.cpp:44: error: 'indicator' has not been declared >> ../main.cpp: In static member function 'static void >> SOCI::TypeConversion<Person>::to_base(const Person&, SOCI::Values&, > int&)': >> ../main.cpp:49: error: 'i_ok' was not declared in this scope > > This is because SOCI 2.x does not give access to indicators from Values. > It's changed in SOCI 3.x > >> To be short: The Debian packages are quiet more than just orphaned. > > AFAIK, debian packages have been contributed by some user who is not an > active member of SOCI dev team, so we don't keep in touch regularly. > IOW, debian packages are out of our scope. The best place to report > problems is Debian team: > > http://packages.debian.org/uk/source/lenny/soci > > By the way, I've just tried to compile SOCI 2.2.0 using GCC 4.3.3 and it > does not build for me. There is number of C/C++ headers missing in SOCI > source files. Sorry for that. Perhaps Debian folks fixed that but we > haven't got any patch, AFAIR. > > Thus, best option would be to build SOCI 3.0.0 or even better, just use > it directly form Git repo. It's fastest chance to get fixes back :-) > >> I would love to compile soci3 myself with sqlite3 backend support. >> >> ./configure --enable-backend-sqlite3 --enable-backend-postgresql >> --enable-backend-mysql make >> >> doesn't work. > > Not very helpful bug report :-) > Which version exactly you're trying to build, 3.0.0 or from Git repo? > What does not work? What errors do you get? > > I have just checked and all the 3 backends build for me very well. > See my backlog here: > > http://mateusz.loskot.net/tmp/soci/soci-master-build-gcc433-20090804.txt > > The only issue I've noticed is that one of common test fails for PostgreSQL. > > BTW, you may get some ./configure like > rm: cannot remove `core': Is a directory it's safe to ignore it. I'm > working on that issue. > > Best regards, ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Soci-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/soci-users
