[odb-users] ODB for iOS cross-compilation

Konstantin Tarovik konstantin.tarovik at ab-soft.net
Thu Apr 9 07:26:23 EDT 2015


Hi Boris & all,

Thank you for the help. I managed to compile ODB runtime for armv7/iOS 
using C++98 dialect using the following 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 
-I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/usr/include/c++/4.2.1" 
LDFLAGS="-arch armv7 -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


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:

../odb/pointer-traits.hxx:239:29: error: no member named 'unique_ptr' in 
namespace 'std'
   class pointer_traits<std::unique_ptr<T, D>>
                        ~~~~~^
../odb/pointer-traits.hxx:239:40: error: 'T' does not refer to a value
   class pointer_traits<std::unique_ptr<T, D>>
                                        ^
../odb/pointer-traits.hxx:238:22: note: declared here
   template <typename T, typename D>
                      ^
../odb/pointer-traits.hxx:311:24: error: no template named 'shared_ptr' 
in namespace 'std'; did you mean 'details::shared_ptr'?
   class pointer_traits<std::shared_ptr<T>>
                        ^~~~~~~~~~~~~~~
                        details::shared_ptr
../odb/details/shared-ptr-fwd.hxx:17:11: note: 'details::shared_ptr' 
declared here
     class shared_ptr;
           ^

Please advise.

Thank you.

Best regards,
Konstantin Tarovik

On 4/8/15 5:50 PM, Boris Kolpackov wrote:
> Hi Konstantin,
>
> Konstantin Tarovik <konstantin.tarovik at ab-soft.net> writes:
>
>> *./configure CC=[...] CFLAGS=[...]
> You need to use CXX, CXXFLAGS when building ODB runtimes since
> they are C++ code.
>
> Also, see this guide for more information on cross-compiling ODB:
>
> http://wiki.codesynthesis.com/Using_ODB_on_Mobile_and_Embedded_Systems
>
> Finally, once you figure it out, I would appreciate a note to this
> mailing list with any tips on using ODB with iOS.
>
> Thanks,
> Boris



More information about the odb-users mailing list