[Solved] [Qt Android] cstdlib error: stdlib.h: No such file or directory ?
-
wrote on 17 Jul 2014, 19:09 last edited by
I am having challenges up a Qt Android development environment under OSX. Suggestions are appreciated.
I am using Q5.3.1 under OS X in an attempt to build an Android Hello World widget application.
I use the 32-bit Android Native development kit R19 because I do not think many Android devices use 64-bit CPUs.
android-ndk64-r10-darwin-x86.tar.bz2
@
14:01:29: Running steps for project qt-hello-world...
14:01:29: Starting: "/Users/esutton/Qt5.3.1/5.3/android_x86/bin/qmake" /Users/esutton/Documents/projects/qt-hello-world/qt-hello-world.pro -r -spec android-g++ CONFIG+=debug
14:01:30: The process "/Users/esutton/Qt5.3.1/5.3/android_x86/bin/qmake" exited normally.
14:01:30: Starting: "/usr/bin/make"
/Users/esutton/Qt5.3.1/5.3/android_x86/bin/uic ../qt-hello-world/mainwindow.ui -o ui_mainwindow.h
/Users/esutton/android/android-ndk-r10/toolchains/x86-4.9/prebuilt/darwin-x86/bin/i686-linux-android-g++ -c -ffunction-sections -funwind-tables -O2 -fomit-frame-pointer -fstrict-aliasing -funswitch-loops -finline-limit=300 -DANDROID -Wa,--noexecstack -std=gnu++0x -g -g -gdwarf-2 -Wall -Wno-psabi -W -D_REENTRANT -fPIE -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../../../Qt5.3.1/5.3/android_x86/mkspecs/android-g++ -I../qt-hello-world -I../../../Qt5.3.1/5.3/android_x86/include -I../../../Qt5.3.1/5.3/android_x86/include/QtWidgets -I../../../Qt5.3.1/5.3/android_x86/include/QtGui -I../../../Qt5.3.1/5.3/android_x86/include/QtCore -I. -I. -I../../../android/android-ndk-r10/sources/cxx-stl/gnu-libstdc++/4.9/include -I../../../android/android-ndk-r10/sources/cxx-stl/gnu-libstdc++/4.9/libs/x86/include -I/Users/esutton/android/android-ndk-r10/platforms/android-9/arch-x86//usr/include -I. -o main.o ../qt-hello-world/main.cpp
In file included from ../../../android/android-ndk-r10/sources/cxx-stl/gnu-libstdc++/4.9/include/bits/stl_algo.h:59:0,
from ../../../android/android-ndk-r10/sources/cxx-stl/gnu-libstdc++/4.9/include/algorithm:62,
from ../../../Qt5.3.1/5.3/android_x86/include/QtCore/qglobal.h:85,
from ../../../Qt5.3.1/5.3/android_x86/include/QtGui/qwindowdefs.h:45,
from ../../../Qt5.3.1/5.3/android_x86/include/QtWidgets/qwidget.h:45,
from ../../../Qt5.3.1/5.3/android_x86/include/QtWidgets/qmainwindow.h:45,
from ../../../Qt5.3.1/5.3/android_x86/include/QtWidgets/QMainWindow:1,
from ../qt-hello-world/mainwindow.h:4,
from ../qt-hello-world/main.cpp:1:
../../../android/android-ndk-r10/sources/cxx-stl/gnu-libstdc++/4.9/include/cstdlib:72:20: fatal error: stdlib.h: No such file or directory
#include <stdlib.h>
^
compilation terminated.
make: *** [main.o] Error 1
14:01:30: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project qt-hello-world (kit: Android for x86 (GCC 4.9, Qt 5.3.0))
When executing step 'Make'
14:01:30: Elapsed time: 00:01.
@My quake project file:
@Project created by QtCreator 2014-07-17T13:37:48
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = qt-hello-world
TEMPLATE = appSOURCES += main.cpp
mainwindow.cpp
HEADERS += mainwindow.h
FORMS += mainwindow.ui
CONFIG += mobility
MOBILITY =
@ -
wrote on 17 Jul 2014, 20:10 last edited by
Solved.
It appeared I had a 64-bit NDK installed even though I thought I had downloaded a 32-bit NDK.
I blew away all NDK remnants and downloaded new 32-bit r10 NDK and now my Android x86 emulator is launching my Qt hello world app.
android-ndk32-r10-darwin-x86.tar.bz2
-Ed
1/2