Setting up a cross-compiling ide allowing cross platform and mutiple architecture development
-
Good day all
please note c++ newbie here, bear with me if I do not immediately understand, thanks.
In my attempt at learning C++, I took up a project for a client server application.
My aim is to allow my server application to run on "almost" any linux distro and architecture, from a normal amd64 processor to a simple armhf (Raspberry pi 3) processor.
Note: I have searched for quite a long time, compiled compilers, installed new ones, etc but had no success
Background Info (for perspective):
This is what I have done so far. I have created my server client application in QT-Creator, in Linux AMD64. So far both only run in Linux. I wanted to check if my application successfully works over the local subnet and not just on the localhost, thus running into my first problem, my amd64 binary is not compatiable with armhf arch.So, I decided to put that on hold and copy my working linux code straight onto a Windows installation of QT, but some headers were not compatible, thus requiring some changes, and code changes, which I am currently busy with.
Question:
How can I, like other developers, compile my application for multiple processor architectures and also cross platform development?Note:
I have installed a custom MinGW compiler, but attempting to create a new kit with these compilers gives an error (red explaimation mark) reading: "Compiler () cannot produce code for QT version 5.7.0 GCC 64bit"Currently my only solution is to copy my code into each of the platform's QT installation, change what needs to be changed and compile, but this will cause SERIOUS issues for bug fixes/updates, etc.
There needs to be an easier way for my to do this!
-
Hi
Crosscompiling is always a pain.
Did you try
https://wiki.qt.io/Raspberry_Pi_Beginners_Guide- thus running into my first problem, my amd64 binary is not compatiable with armhf arch.
Nope. And you might also run into
https://en.wikipedia.org/wiki/Endianness
This is handled transparent by
http://doc.qt.io/qt-5/qdatastream.html#details
- thus running into my first problem, my amd64 binary is not compatiable with armhf arch.
-
@CybeX
It seems to bug out on
arm-linux-gnueabihf-g++: error: unrecognized command line option ‘-Wdate-time’
arm-linux-gnueabihf-g++: error: unrecognized command line option ‘-Wshift-overflow=2’
arm-linux-gnueabihf-g++: error: unrecognized command line option ‘-Wduplicated-cond’Are you using gcc 4.8 ?
-
@mrjj no:
gcc --version
gcc (Ubuntu 6.2.0-5ubuntu12) 6.2.0 20161005
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.2 questions:
- why do you ask about 4.8 specific?
- If there is a solution, please take me through your thought process about solving this :p
-
@CybeX
1:I saw on google that someone else had this error with gcc 4.8. Upgrading solved it. Not saying it will for you. But was the only errors i could find in your log.
2: Sorry I don't know how to solve this. People are compiling for the PI but I never got around to try one
so the details of getting it to work is also unknown to me.
Update:
I have a good eye to https://www.ics.com/blog/configuring-qt-creator-raspberry-pi but no board so didnt try yet.