[odb-users] How to compile "hello" example on RHEL
Stroud, Sean T
ststrou at sandia.gov
Fri Sep 7 17:37:01 EDT 2012
Hi,
I’m a new user, evaluating odb for potential use on our project. The documentation and examples look really great. Only one problem – how do you compile them? For the “hello” example I see there is a “README” file. I would expect the README file to say how to compile and link the example but it doesn’t (it only tells how to run odb to generate the code).
My environment:
• OS: Linux (RHEL)
• Compiler: g++ 4.1.2
• ODB version: 1.7.0
• ODB installation dir: /home/ststrou/ODB
As a guess, I tried the following command in the “/home/ststrou/ODB/odb-examples-1.7.0/hello” directory:
% g++ -c driver.cxx -I /home/ststrou/ODB/libodb-1.7.0 -I /home/ststrou/ODB/libodb-mysql-1.7.0
But that fails with the following output:
In file included from /home/ststrou/ODB/libodb-1.7.0/odb/details/export.hxx:11,
from /home/ststrou/ODB/libodb-1.7.0/odb/forward.hxx:11,
from /home/ststrou/ODB/libodb-1.7.0/odb/traits.hxx:11,
from /home/ststrou/ODB/libodb-1.7.0/odb/database.hxx:14,
from driver.cxx:8:
/home/ststrou/ODB/libodb-1.7.0/odb/details/config.hxx:17:34: error: odb/details/config.h: No such file or directory
In file included from /home/ststrou/ODB/libodb-mysql-1.7.0/odb/mysql/version.hxx:11,
from person-odb.hxx:37,
from driver.cxx:14:
/home/ststrou/ODB/libodb-mysql-1.7.0/odb/mysql/details/config.hxx:18:40: error: odb/mysql/details/config.h: No such file or directory
database.hxx: In function ‘std::auto_ptr<odb::database> create_database(int&, char**)’:
database.hxx:85: error: ‘db’ was not declared in this scope
I tried looking at the Makefile.am and Makefile.im files, but they look ridiculously complicated and I have no idea how to invoke them.
Thanks,
Sean
More information about the odb-users
mailing list