[odb-users] Installing ODB Compiler
Nathan White
newhite at rslfibersystems.com
Wed Mar 6 10:03:52 EST 2013
Boris
I'm receiving this error "Error unknown database; did you forget to define the DATABASE_* macros?"
What is DATABASE_* macros?
I guessed at what the error is and changed
#ifndef DATABASE_HXX
#define DATABASE_HXX
To
#ifndef odbtest
#define odbtest
Regards,
Nathan
-------------------------------
I solved the initial problem of not being able to create peron-odb files. My issue with creating the person-odb files stemmed from me not being in the exact folder where person.hxx is stored. It was the last configuration I tried. Thank you for helping me through this issue. As I am a new Ubuntu, odb, and SQLite user there are many unknowns for me so I often have a lot of questions.
Regards,
Nathan
-----Original Message-----
From: Boris Kolpackov [mailto:boris at codesynthesis.com]
Sent: Wednesday, March 06, 2013 6:15 AM
To: Nathan White
Cc: odb-users at codesynthesis.com
Subject: Re: [odb-users] Installing ODB Compiler
Hi Nathan,
Nathan White <newhite at rslfibersystems.com> writes:
> I'm using Ubuntu 12.04LTS 32-Bit System.
In this case you should be able to install directly from the package:
sudo dpkg -i odb_2.2.0-1_i386.deb
Have you tried this? If it didn't work, what was the error?
The advantage of using the package instead of the archive is that the ODB compiler will be installed in the default location and you will be able to invoke it just as odb, for example:
odb -d sqlite person.hxx
> I ran /opt/odb-2.2.0-i686-linux-gnu/bin/odb -d sqlite person.hxx, but
> person.hxx was in read mode. Where does person.hxx need to be? Can it
> already be included in a C++ project?
person.hxx is a C++ header from the hello example that used in the sample command lines. Normally, you would have your own header with your own persistent classes. If you want to use person.hxx (e.g., to test the ODB compiler), then you can find it in the hello/ subdirectory in the odb-examples package.
> newhite at newhite-GX-630:/opt$ sudo /opt/odb-2.2.0-i686-linux-gnu/bin/odb ...
You don't need to use sudo when invoking the ODB compiler.
Boris
More information about the odb-users
mailing list