[odb-users] First project: can't find QtCore/QString on OSX
boris at codesynthesis.com
Mon Jun 9 07:23:40 EDT 2014
Adnan RIHAN <adnan at rihan.fr> writes:
> odb -d sqlite -p qt --generate-query Category.hpp
> /Users/Max13/Dev/System/ODB/Compiler/odb-2.3.0-i686-macosx/lib/odb/i686-apple-darwin8/lib/gcc/../../include/odb/qt/basic/sqlite/default-mapping.hxx:8:26: fatal error: QtCore/QString: No such file or directory
> So I’ve tried many combinations, including:
> adding -I to the lib dir or to the Headers’ framework dir, but nothing
> is working, QtCore/QString isn’t found.
Ok, the problem here is that the private copy of GCC that is used by
the ODB compiler is not built with support for frameworks (so we
cannot use -F or -framework). This is something that I am hoping to
try and address in the future.
So in the meantime we need to try to come up with the equivalent -I
options (ODB compiler only needs headers so we don't need to worry
about libraries). Based on my understanding of the framework layout
that you have showed earlier, you will need to make a symlink in
order to re-create the standard Qt header hierarchy. Since it will
only be used by ODB, a good place to create this symlink is in the
ODB compiler's etc/ subdirectory:
ln -s /Users/Max13/Qt/5.2.1/clang_64/lib/QtCore.framework/Headers ./QtCore
Then open the 'default.options' file in this directory and add these
With these two changes your original command line should work fine.
More information about the odb-users