Results 1 to 15 of 15

Thread: Error while trying to build android app. #error Bionic header ctype.h...

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Error while trying to build android app. #error Bionic header ctype.h...

    [QUOTE=hackree;280347]/opt/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/include/iostream:39: from /opt/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/include/iostream:39,

    /home/ihaaaaa/QtProjects/freesteam/main.cpp:8: from ../freesteam/main.cpp:8:[/Iquote]

    So you are including some standard header there in line 8 of main.cpp?

    If yes, check if the error also happens in a minimal project without Qt. If so you might want to ask on an Android forum instead,

    Cheers,
    _

  2. The following user says thank you to anda_skoa for this useful post:

    hackree (1st August 2015)

  3. #2
    Join Date
    Jul 2015
    Posts
    7
    Thanks
    7
    Qt products
    Qt5
    Platforms
    Unix/X11 Android

    Default Re: Error while trying to build android app. #error Bionic header ctype.h...

    I've tried that. If I remove any link to C++ or anything outside QML it (the UI) compiles and runs well. Also if I try to run it as a desktop app it works. From digging around the internet I found something suggesting that the compiler is including a header from the system when it should be using one from the android ndk.

    Had no luck on finding a solution yet though.

    Thanks.

  4. #3
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Error while trying to build android app. #error Bionic header ctype.h...

    Are you able to build, deploy, and run a simple "Hello world!" program that uses iostream for Android using your build environment?

    Your pro file does indeed include a bunch of folders for your native environment: all includes and libraries should be coming from the NDK. It also contains what looks like the wrong name for the freesteam library. Try this cut down version
    Qt Code:
    1. TEMPLATE = app
    2. QT += qml quick
    3. SOURCES += main.cpp \
    4. mysteamclass.cpp
    5. RESOURCES += qml.qrc
    6. # Additional import path used to resolve QML modules in Qt Creator's code model
    7. QML_IMPORT_PATH =
    8. # Default rules for deployment.
    9. include(deployment.pri)
    10. HEADERS += \
    11. mysteamclass.h
    12. #--------------------------------ME= C++11 AND LIBRARIES-----------------#
    13.  
    14. CONFIG+=c++11
    15. LIBS += -lgsl
    16. LIBS += -lfreesteam
    17. LIBS += -lgslcblas
    To copy to clipboard, switch view to plain text mode 

    I am assuming the the three libs have been built with the cross-compiler and installed in the NDK default library path.

  5. The following user says thank you to ChrisW67 for this useful post:

    hackree (1st August 2015)

  6. #4
    Join Date
    Jul 2015
    Posts
    7
    Thanks
    7
    Qt products
    Qt5
    Platforms
    Unix/X11 Android

    Default Re: Error while trying to build android app. #error Bionic header ctype.h...

    Quote Originally Posted by ChrisW67 View Post
    Are you able to build, deploy, and run a simple "Hello world!" program that uses iostream for Android using your build environment?

    Your pro file does indeed include a bunch of folders for your native environment: all includes and libraries should be coming from the NDK. It also contains what looks like the wrong name for the freesteam library.
    Well, I can build and run simple programs but I have to admit that I don't know what exactly an iostream for android is.

    I am assuming the the three libs have been built with the cross-compiler and installed in the NDK default library path.
    When I installed them I just used the ./run like command from the terminal so I'm assuming the weren't built with a cross compiler! And for sure they're not in the default library path of the NDK.

    Going after what you said, it pretty much looks like I'm hopeless huh?

    Thank you very much.

  7. #5
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Error while trying to build android app. #error Bionic header ctype.h...

    If you do not have the freesteam/gsl library built for the Android target you will not get to the finish line. The linker will need these to build a working Android app even if we got past the prsent compilation-stage errors.

    It looks like you need quite a few pieces to achieve that.

  8. The following user says thank you to ChrisW67 for this useful post:

    hackree (2nd August 2015)

  9. #6
    Join Date
    Jul 2015
    Posts
    7
    Thanks
    7
    Qt products
    Qt5
    Platforms
    Unix/X11 Android

    Default Re: Error while trying to build android app. #error Bionic header ctype.h...

    Quote Originally Posted by ChrisW67 View Post
    If you do not have the freesteam/gsl library built for the Android target you will not get to the finish line. The linker will need these to build a working Android app even if we got past the prsent compilation-stage errors.

    It looks like you need quite a few pieces to achieve that.
    That's what I figured.

    It seems like I heavily underestimated the complexity that hides behind the code once deploy everywhere phrase. I couldn't even manage to deploy and create a (desktop)package for this app, let alone make it work on android.

    This may be because I'm fairly new to linux but still. In visual studio it was way easier creating executable files and distributing them. Not cross platform but still very easy to do.

    Seems like this has to wait until I find some time to dig deeper in qt and the whole things like writing .pro and make files, cmake, qmake, library cross compilations and all that stuff.

    Maybe we'll chat again sometime in the upcoming future, when I get stuck, again.

    Thank you for your time.

Similar Threads

  1. qt for android 5.5 some error
    By xiaoxiangyu in forum Qt Programming
    Replies: 3
    Last Post: 15th July 2015, 22:15
  2. Android: Error while building/deploying project
    By JeanC in forum Installation and Deployment
    Replies: 1
    Last Post: 21st June 2015, 21:18
  3. Building error qt android
    By dmcyster@gmail.com in forum Newbie
    Replies: 1
    Last Post: 8th May 2015, 15:55
  4. Qt 5.1 for Android error
    By Baso in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 27th July 2013, 10:47
  5. qt5.1 create a android test app met a error
    By tsuibin in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 25th July 2013, 07:40

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.