I'm trying to compile kconfig, which supposedly works on android, for android but am faced with the following
In file included from /home/dashed/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/include/bits/stl_algo.h:59:0,
from /home/dashed/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/include/algorithm:62,
from /home/dashed/android-qt/include/QtCore/qglobal.h:109,
from /home/dashed/android-qt/include/QtCore/QtGlobal:1,
from /home/dashed/Documents/kconfig/src/core/kconfigbase.h:29,
from /home/dashed/Documents/kconfig/src/core/kconfig.h:27,
from /home/dashed/Documents/kconfig/src/core/kconfig.cpp:23:
/home/dashed/android-ndk-r10e/sources/cxx-stl/gnu-
libstdc++/4.9/include/cstdlib:72:20: fatal error: stdlib.h: No such file or directory
#include <stdlib.h>
^
I generated the makefile with :
cmake -DCMAKE_TOOLCHAIN_FILE=/usr/share/ECM/toolchain/Android.cmake -DECM_ADDITIONAL_FIND_ROOT_PATH=/home/dashed/android-qt -DCMAKE_INSTALL_PREFIX=/home/dashed/android-kf5 ..
what can I do to compile it successfully ?
I sorta 'solved' this by updating my ndk. I was using r10e to compile qt but using r17b is successful.
Related
I am currently working on trying to compile the stressapptest (link: https://github.com/stressapptest/stressapptest) using the NDK environment, and for some reason, I'm having a hard time. These are the steps that I have taken:
Clone the repository onto my computer
Added a jni folder and moved all the files into it
Created an Application.mk file
Opened PowerShell from the location of my jni folder and execute ndk-build. This is the error I'm getting:
PS C:\Users\...\Desktop\stressapptest-master\stressapptest-master> ndk-build
Android NDK: APP_PLATFORM not set. Defaulting to minimum supported version android-16.
[arm64-v8a] Compile++ : stressapptest <= main.cc
In file included from jni/src/main.cc:17:
jni/src/sattypes.h:25:10: fatal error: 'algorithm' file not found
#include <algorithm>
^~~~~~~~~~~
1 error generated.
make: *** [obj/local/arm64-v8a/objs/stressapptest/src/main.o] Error 1
Is there anything else that I need in order to compile this to run on an Android system?
Set APP_STL to c++_shared in your Application.mk. ndk-build does not use any STL by default.
I'm trying to compile android-kernel-goldfish-2-6-29 but when i use make -j2 to compile it, i get this error:
include/linux/compiler-gcc.h:86:30: fatal error: linux/compiler-gcc6.h: No
such file or directory
#include gcc_header(__GNUC__)
my ubuntu is 17.04 and i downgrade my gcc to
gcc version 4.7.4 (Ubuntu/Linaro 4.7.4-3ubuntu12)
can any body fix the problem?
I changed the goldfish version from 2.6.29 to 3.18 and now everything is okay.
I have a working project in eclipse that uses ffmpeg. The implementation is like in this tutorial: http://enoent.fr/blog/2014/06/20/compile-ffmpeg-for-android/
After importing the project into Android Studio 2.1 the only error I got was related to
android.useDeprecatedNdk=true in my gradle.properties
When I try to run the project I get the following error:
config.h: No such file or directory
on ffmpeg.h
#ifndef FFMPEG_H
#define FFMPEG_H
#include "config.h"
#include <stdint.h>
#include <stdio.h>
#include <signal.h>
....
My build.gradle has:
ndk {
moduleName "videokit"
}
What should I do to fix the problem?
LE: Possible solution:
- I created the jniLibs folder and added the .so file from eclipse lib's folder and it seem to work...
I am currently trying compiling GnuTLS (for wget) for Android with the Android cross-compile toolchain.
I already fixed many missing-library errors, but now I get the error
./includes/gnutls/gnutlsxx.h:26:21: fatal error: exception: No such file or directory
#include <exception>
I am using "arm-linux-androideabi-gcc (GCC) 4.9 20140827 (prerelease)" and am using this script https://gist.github.com/z3ntu/57b95b02ebe8e153d5a8 for settings up the env-variables.
You want to run the following command which will tell you where gcc's pre-processor is. Then ask that pre-processor here it's looking for C++ header files:
gcc -print-prog-name=cc1plus -v
then tweak your setup accordingly.
Actually I solved it myself... (still thanks for the help everybody!)
So for all who wonder how to compile GnuTLS for Android:
Create a standalone toolchain: Execute build/tools/make-standalone-toolchain.sh --platform=android-21 --install-dir=<your_directory> --toolchain=arm-linux-androideabi-4.9 --stl=gnustl from the NDK root dir (maybe ~/Android/Sdk/ndk-bundle/)
Compile it with extra -lgnustl_shared in your LDFLAGS.
i want to parse xml by rapidxml(on android devices, NDK).
but when i include the rapidxml.hpp in my cpp file, and compile it.
the compilor shows me that "jni/rapidxml.hpp:11:47: fatal error: cstdlib: No such file or directory". what's wrong with it?
the code and compile result followed.
source code:
#include "rapidxml_utils.hpp"
void test(){}
compile result:
jni/rapidxml.hpp:11:47: fatal error: cstdlib: No such file or directory
compilation terminated.
make: * [obj/local/armeabi/objs/rapidxml/RapidXml.cpp,rapidxml.o] Error 1
You should also include the header file in your Android.mk using LOCAL_C_INCLUDES in your module.