[odb-users] ODB for iOS cross-compilation
Konstantin Tarovik
konstantin.tarovik at ab-soft.net
Thu Apr 9 10:40:02 EDT 2015
Hi Boris & all,
The include path had to be changed for c++11 enabled stl. Below is the
correct configuration command:
./configure
CXX=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
LD=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
AR=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar
CXXFLAGS="-Os -isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk
-target armv7-apple-darwin -std=c++11 -stdlib=libc++
-I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/"
LDFLAGS="-arch armv7 -stdlib=libc++ -isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk"
--prefix=`pwd`/../install --disable-shared --disable-threads
--host=arm-apple-darwin
Now sqlite-based ODB runtime compiles without problems for iOS/armv7.
Thank you.
Best regards,
Konstantin Tarovik
On 4/9/15 5:08 PM, Boris Kolpackov wrote:
> Hi Konstantin,
>
> Konstantin Tarovik <konstantin.tarovik at ab-soft.net> writes:
>
>> But now I can't use it from the app implemented in C++11. When I try
>> to compile ODB using c++11 (adding compiler param -std=gnu++11) it
>> rises many errors like:
> What do you mean by "compile ODB using c++11"? Are you compiling the
> ODB compiler? Are you compiling something with the ODB compiler?
> If the latter, the ODB compiler doesn't recognize the -std=gnu++11
> option. You should use --std=c++11 instead.
>
> Boris
More information about the odb-users
mailing list