Unsolved Qt creator - cross-compile
-
@peter_cz Just don't add any qmake. In your project settings go to "Build Settings" and add new build step as Make (there is "Add Build Step" button).
-
What "Build Settings"?
Tools->Options->Build & Run
where I do build settings.
-
@peter_cz In QtCreator on the left side click on Projects
-
OK, but when starting a new project, "Build System" wnats define build system. there are options as qmake, CMake, Qbs so when those not available then want to use for that cross-compile just "make". So that's setup here I need to change and that follows my define "Kits" for embedded platform.
So point is that "Kits" has make Build System but no qmake,CMake,Qbs.
That's somehow possible and how to setup?Thank you.
-
@peter_cz said in Qt creator - cross-compile:
So point is that "Kits" has make Build System but no qmake,CMake,Qbs.
I would suggest to use CMake if you don't have qmake on your development machine. Writing makefiles manually for non trivial projects is wasting of time and asking for troubles. And if you're going to support multiple platforms with your project then you would have even more work.
-
understand :)
I got "cross toolchain" on my local linux/ubuntu machine "/opt/my_machine/sysroots" with subfolders "aarch64-poky-linux" and "x86_64-pokysdk-linux"
now I'm looking for a way how to configure it within QT Creator to compile with cross-tooclhain for embedded target platform.
-
I do not have "cmake" available now for that target just "make" and by configuraion via Build & Run does not allow me to have just "make"
in my cross-toolchain I have compiler:
"/opt/my_machine/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux-gcc"can find executable for make
"/opt/my_machine/sysroots/aarch64-poky-linux/usr/bin/makeso now it's question how to configure Build & Run and have own kit in "Kits" for this ?
-
@peter_cz Just install CMake from your distribution on the host machine.
-
do have install on my side - then?
-
Running "/usr/bin/cmake /home/ubuntu/untitled '-GCodeBlocks - Unix Makefiles' -DCMAKE_CXX_COMPILER:STRING=/opt/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-g++ -DCMAKE_C_COMPILER:STRING=/opt/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-gcc '-DCMAKE_PREFIX_PATH:STRING=%{Qt:QT_INSTALL_PREFIX}' -DQT_QMAKE_EXECUTABLE:STRING=" in /tmp/QtCreator-RNTh55/qtc-cmake-XXBJrDUE.
Running "/usr/bin/cmake /home/ubuntu/untitled '-GCodeBlocks - Unix Makefiles' -DCMAKE_CXX_COMPILER:STRING=/opt/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-g++ -DCMAKE_C_COMPILER:STRING=/opt/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-gcc '-DCMAKE_PREFIX_PATH:STRING=%{Qt:QT_INSTALL_PREFIX}' -DQT_QMAKE_EXECUTABLE:STRING=" in /tmp/QtCreator-RNTh55/qtc-cmake-XXTKyg1d.
-- The C compiler identification is GNU 6.2.0
-- The CXX compiler identification is GNU 6.2.0
-- Check for working C compiler: /opt/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-gcc
-- Check for working C compiler: /opt/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-gcc -- broken
CMake Error at /usr/share/cmake-3.5/Modules/CMakeTestCCompiler.cmake:61 (message):
The C compiler
"/opt/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-gcc"
is not able to compile a simple test program.It fails with the following output:
Change Dir: /tmp/QtCreator-RNTh55/qtc-cmake-XXTKyg1d/CMakeFiles/CMakeTmp
Run Build
Command:"/opt/sysroots/aarch64-poky-linux/usr/bin/make"
"cmTC_5dbdc/fast"/opt/sysroots/aarch64-poky-linux/usr/bin/make:
1:
/opt/sysroots/aarch64-poky-linux/usr/bin/make:
Syntax error: "(" unexpectedCMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:3 (project)-- Configuring incomplete, errors occurred!
See also "/tmp/QtCreator-RNTh55/qtc-cmake-XXTKyg1d/CMakeFiles/CMakeOutput.log".
See also "/tmp/QtCreator-RNTh55/qtc-cmake-XXTKyg1d/CMakeFiles/CMakeError.log".
*** cmake process exited with exit code 1.