Solved Shadow build qt for android.
-
So i think that's what i am doing , shadow building qt's libs for android development, i am new to this world so i dont know if that's the 100% correct definition of what i'm trying to do.
i have followed the steps here except i cloned the repo from git before doing the configuration steps.
when i cd to my git repo location "c:\qt-android\qt5#2\qt5" and attempt to run the command
configure.bat -developer-build -platform win32-g++ -opengl es2 -xplatform android-g++ -android-ndk ANDROID_NDK_PATH -android-sdk ANDROID_SDK_ROOT -opensource -confirm-license -nomake tests -nomake examples
i get an error out put like
mingw32-make: *** No rule to make target 'c:/qt-android/qt5tools/configure/confi
gure_pch.h', needed by 'configure_pch.h.gch/c++'. Stop.i have been looking around the net for a few days and all i have found that's simi related to this problem is a bug report found here. Use the find function and type "'configure_pch.h.gch/c++" to get to the exact post i am referring to.
Any help is much appreciated and thanks in advanced. Also any corrections in my terminology would be awesome too. Cheers.
you can also contact me directly at christopher.ray@cfdrc.com
-
Hi and welcome to devnet,
Might be a silly question but did you initialize the Qt repository after cloning it ?
Also, I see a # in your path, if so, I'd replace it with something else to be on the safe side.
-
OK will do. Yah, I assume you're talking about the "perl init-repository" command. If i hadn't i believe in the configure.bat file there's something like
if not exist "%configure%" (
echo %configure% not found. Did you forget to run "init-repository"? >&2
exit /b 1
)but thanks for the quick reply, i think i might try different versions on MINgw because i have an older version that i could run the configure and mingw32-make commands until completion.
also any more possible suggestions would be welcomed, as i said, i am new to this world of development so feel free to correct me where i'm wrong as to not start any bad habits. Cheers
-
IIRC, you shouldn't need to set the platform parameter on the configure line.
-
@SGaist thanks, those changes have led me to different error, that being said i'm sorry i'm so bad at this, is there another guide i should be using other than the one i referenced in the OP? Thanks.
edit-
so i spoke too soon, i'm still getting the same error, the "new" error was that i have multiples of mingw32-make.exe running. Thanks for the help so far though :) -
Out of curiosity, why do you need to compile your own version of Qt for Android ?
Also which version of Qt are you trying to build ?
-
Basically taking and old c++ application that has QT and OSG dependencies and making it run on an android. I've searched around the web and found this which requires Mingw or ninja, so we don't have to re-make all of the cmakeLists.txt's. So it "made sense" to stop building, successfully i might add, OSG and QT with MSVS 2014 compiler, with cmake, and compile everything with mingw.
So i need to compile QT and OSG together because we're using cmake (currently to build everything) and when it's all said and done i need all of my cmakeLists to work with the android NDK to build. Like i said i dont really know what all i'm doing so correct me where i'm wrong or ignorant.
At the end of the day i want an APK from my c++ application that currently targets UNIX and Windows.
Sorry for all the redundancy.
environment:
building qt 5.5 or newest stuff in git repo targeting android 21
windows 7 pro sp1, 64-bit
i5-2400
8GB ram -
Qt 5 is already well supported by CMake and there's also the Android package that provides a ready to use Qt for Android.
-
So i'm not using QT creator just to be clear;
However you're saying i won't/don't need to compile qt for android to do what i'm trying to do?
i should follow this example? and presumably i'll be able to group all of my Open scene graph and c++ dependencies with the androiddeployqt dev tool?
-
Qt Creator does simplify your life a lot to handle the projects but it's by no mean mandatory even for Android development.
You would only end up with a Qt version similar to the one provided by the Qt Android package.
Since I don't know what your software is made of, I can't comment on how would androiddeployqt would work. But it should be its primary goal yes.
-
So really what i wanted was .a or .so for all of the libraries for OSG and QT 5.5 and from the looks of it androiddeployqt would just take the place of the android NDK which is not want i wanted. Anyway, thanks for trying. :)
-
So you expected some kind of "super-lib" made of all Qt modules ?
-
I expected it to add another perspective on how to do something, specifically creating the static and shared libraries, nothing else. Plus i don't know alot about the field so i'm game for learning anything that might help :).
-
There are not many perspectives:
- shared libraries
- static libraries
- mix of both
In the end your package has to contain the dependencies of your application. What you might not see is that Android is a special case in the sense that you don't build an executable like you would for OS X or any other desktop environment.
-
Yah, i know what i must do, or at least think i do, but i had a LOT of difficulties building the application for a windows environment, so i knew i would run into a lot of issues when attempting to build the application targeting android os.
-
This post is deleted! -
So i changed versions of MinGW and it seems to have worked, if anyone else runs into my issue. Apparently the version of MinGW i was linked to was incomplete, i assume this was an error on my part. Thread is free to be closed imho. Thanks for the help again :)
-
Glad you found out and thanks for sharing !
You can mark it yourself :) For that you have to first convert it to a question and then mark it as solved using the "Topic Tool" button.