[odb-users] new user issue, already tried out the examples

Jim Green student.northwestern at gmail.com
Tue Jan 10 23:56:59 EST 2012


Greetings!

the application where I want to use odb is built like this:

1,  cpp files are compile to corresponding .o files.
2, some of the .o files are archived to .a ( each .a represents a library)
3, the .a files are linked with non archived .o files to produce the executable.


I would be using odb in one of the cpp file(call it test.cpp, it is
one module in a library) in step 1.

and I tried add the following

in test.cpp

#include <odb/database.hxx>
#include <odb/session.hxx>
#include <odb/transaction.hxx>
#include "~/dev/pkgs/odb/odb-examples-1.7.0.2/hello/database.hxx"
#include "person.hxx"
#include "person-odb.hxx"

all of them are in search path.

when I tried to make test.o in step 1, I get the following error:

dev/pkgs/odb/odb-examples-1.7.0.2/hello/person.hxx:13: error: ignoring
#pragma db object


I tried various things, read the documentation but still couldn't
figure out the problem, any help would be greatly appreciated!

Thank you and more info would be provided if needed.

Jim.



More information about the odb-users mailing list