[odb-users] when running odb compiler get error "#error
libodb-mysql header included in odb-compiled header"
Richard Topolewski
topolewr at cooley.edu
Mon Oct 23 19:31:19 EDT 2017
I got odb or myClass1 to create the myClass1-odb.hxx, myClass1.sql,
myClass1-odb.cxx, myClass1-odb.ixx.
I then modified useingClass to use persist my set of myClass1s, and also
load the set of myClass1s from the database. Cool.
Then I started working on myClass2. When I went to run the odb complier it
has some errors because myClass2 depends on a number other packages. Ok,
resolved all those errors but then end up with an error:
In file included from /usr/include/odb/mysql/version.hxx:10:0,
from myClass1-odb.hxx:83,
from usingClass.h:24,
from myClass2.h:10:
:/usr/include/odb/mysql/details/config.hxx:15:4: error: #error libodb-mysql
header included in odb-compiled header
Turns out myClass2 includes a member pointer to usingClass which includes
the member vector array of myClass1s then includes
The odb complier command I am using is:
odb -I/usr/include/odblib --std c++14 $(INCLUDES) -d mysql --generate-query
myClass2.h
What am I doing wrong? Do I need to not structure my classes this way?
Should I not be creating the db object in usingClass? Is there some part
of the odb manual I should be looking at?
If there is any additional information I need to provide please let me know.
Rich Topolewski
More information about the odb-users
mailing list