Compiling for iOS failed - Memory ?



  • Hello, I'm writing an iPhone app that uses QNetworkAccessManager && QSvgRenderer.

    My code works like a charm on the desktop but on my iPad, I have this errors at compiling :

    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:2701:35: error: expected expression
            {return __ptr_.first() != ;}
                                      ^
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:2892:35: error: expected expression
            {return __ptr_.first() != ;}
                                      ^
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:3035:35: error: expected expression
        return less<_P1>()(__x.get(), );
                                      ^
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:3044:24: error: expected expression
        return less<_P1>()(, __x.get());
                           ^
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:3052:13: error: expected expression
        return  < __x;
                ^
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:3060:18: error: expected expression
        return __x < ;
                     ^
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:3068:15: error: expected expression
        return !( < __x);
                  ^
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:3076:20: error: expected expression
        return !(__x < );
                       ^
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:3084:20: error: expected expression
        return !(__x < );
                       ^
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:3092:15: error: expected expression
        return !( < __x);
                  ^
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:4918:36: error: expected expression
        return less<_Tp*>()(__x.get(), );
                                       ^
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:4926:25: error: expected expression
        return less<_Tp*>()(, __x.get());
                            ^
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:4934:13: error: expected expression
        return  < __x;
                ^
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:4942:18: error: expected expression
        return __x < ;
                     ^
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:4950:15: error: expected expression
        return !( < __x);
                  ^
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:4958:20: error: expected expression
        return !(__x < );
                       ^
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:4966:20: error: expected expression
        return !(__x < );
                       ^
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:4974:15: error: expected expression
        return !( < __x);
                  ^
    fatal error: too many errors emitted, stopping now [-ferror-limit=]
    

    And many more.

    Is this a problem of memory in my application ? Maybe there is too much dynamic allocation or something ?

    Thanks for your answer.


  • Lifetime Qt Champion

    Hi,

    How big is your application ? Do you have assets in it ?



  • @SGaist It's not a big application but there is some kind of these :

    #ifdef TARGET_TYPE_XXX
    #include <xxxx.h>
    #else
    ...
    ...
    

    Is it a problem on iOS ?

    I also tried to add different type of c++11 to the pro file but anyway, that changes nothing.

    CONFIG += c++11
    QMAKE_CXXFLAGS += -std=c++11
    

    It's strange

    EDIT 1 : After working on an other project, It looks like it's not a problem with my project but with the environment. Even with a new project, I can't launch it on iOS, same errors.


  • Lifetime Qt Champion

    What version of Qt are you using ? On what version of OS X ? Which Xcode are you using ?



  • @SGaist Qt Version : 5.5 - OS X version : 10.11.5 - Xcode version : 7.3

    Everything is up-to-date and it was working on monday and then errors. The project is still running on an other Mac..


  • Lifetime Qt Champion

    That's strange, did you have any update in between from your system ?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.