soci c++ on ubuntu 8.10

If you try to build soci-3.0.0 on ubuntu 8.10 you might get some annoying error. I list below the errors and their fixes:

common.h:24: error: ‘std::tm’ has not been declared

fix: add to common.h:

#include <ctime>

errors in file session.cpp:

session.cpp:134: error: ‘strtol’ is not a member of ‘std’

error: ‘INT_MAX’ was not declared in this scope

fix: add to session.cpp

#include <cstdlib>

#include <climits>

in file standard-into-type.cpp:

standard-into-type.cpp:84: error: ‘strncpy’ is not a member of ‘std’

fix:add to standard-into-type.cpp

#include <cstring>

Links related to the soci library:

  • http://soci.sourceforge.net/
  • http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl?Relational_Database_Access
  • http://www.ddj.com/cpp/188700800?pgno=3
  • http://erdani.org/publications/traits.html
01
jim
September 12th, 2009 9:13 pm

Thanks a lot for this soci fix buddy.

02
ramesh
December 22nd, 2010 8:49 am

Thanks,It works

03
Rots
July 19th, 2011 5:48 am

Thanks alot

Leave Your Comment

Name*
Mail*
Website
Comment