Real Android device fails with 'cannot find crtbegin_so.o'



  • My app builds and runs on the android emulator just fine. When I try to run on a real device (Swift 2.0) I get several errors, the first of which is:

    • :-1: error: cannot find crtbegin_so.o: No such file or directory
      There are several more 'cannot finds':
    • llog
    • lz
    • lm
    • ldl
    • lstdc++

    Since I have done no configuring at all for real android (aside from choosing arm64-v8a) I am at a loss as to how to proceed. There is some literature on missing crtbegin_so.o, but the solutioons require tinkering with clang commands. I don't want to start doing this as I know just enough to make a right mess of things, but not enough to sort it out.

    Any suggestions as to how to procede?

    Thanks in advance

    Aethelnorn



  • @aethelnorn
    While you're waiting for someone who knows what they're talking about to reply, do you mind if I guess? I've never done Android but those are basic shared libraries so one of:

    • those libraries do not exist on the target
    • they do exist, but your app is not set to search for them correctly
    • you're supposed to deploy via some package that sets it up or includes them
    • you're not supposed to distribute for shared, you're supposed to statically link

    ? :)



  • @JonB Sounds like you know more than me..... My problem is that there is either something simple that I have got wrong, or its a known bug. If I go diddling around with stuff that I do not understand then I am likely to muck things up big-time and cause more problems with my 'interfering'.

    But thanks for the suggestions

    Aethelnorn.



  • @aethelnorn
    It won't be a bug. It would affect everybody. To go from the emulator to a real device, are you supposed to "package" and "install" it in some way? Hopefully a kindly Qt-Android expert will drop by....



  • I had the same problem. I solved it by going to Projects->Build Environment and changing ANDROID_NDK_PLATFORM from android-16 to android-28 and then "Build->Run qmake" and Build.


Log in to reply
 

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