[odb-users] Need Help for compiling ODB for iOS

Andrew Cunningham odb at a-cunningham.com
Sat Aug 20 12:11:03 EDT 2016


Hi Boris,
Do you mean compiling "libodb" and "libodb-sqlite" for iOS? Or the ODB
compiler itself?

Obviously it would be nice to be able to build/use the ODB compiler
directly within XCode but I am not sure if that is possible given GCC is
not supported on MacOS anymore as far as I understand. Maybe someone else
can suggest  an option there.
Of course it would be easy to ODB-compile the headers via a Windows/Linux
VM or something similar.

As far as compiling libodb/libodb-sqlite as iOS static libraries, this is
very easy.
It may be possible to do this entirely via some tricky command-line use,
but that's outside of my experience base.

Extract the archives into a directory on OS X
./configure
./make
as per any Linux platform. This of course builds the x86 versions.

Start Xcode
Create a new project ( libodb, libodb-sqlite) targeting iOS Static Library
Set the preprocessor macro HAVE_CONFIG_H
Add the ODB search #include paths
Set "always search user include paths" to yes
Add the source code files from the ODB libraries
Build.



Andrew


More information about the odb-users mailing list