I have developed Qt on Windows for Windows, and on Linux for Linux.
I understand that in order to develop a Qt application for both Windows + Linux is well documented (although I haven't actually done it yet).
What I would like to do is create a Qt project but run it on both Windows + Linux .
Is this possible?
Assuming you're asking about developing Qt Project on both Operating system.
Yes . you can open your project in both operating system if you have Qt Creator or related development application installed.
Assuming you want to compile your project for both Operating systems
you can follow up this for cross-compilation : How do I configure Qt for cross-compilation from Linux to Windows target?
or you can compile it on your Linux Distribution maybe inside the VM-ware .
also good read if you need more : https://forum.qt.io/topic/16018/how-to-compile-a-qt-application-targeting-for-linux-from-a-windows-machine/15
Source : Internet.
Related
Is it possible to cross-compile a program targeting a Cygwin environment from a Linux/Unix host? I'm mostly trying to avoid using a Windows WM for building a collection of programs.
From the website:
Cygwin is not:
a way to run native Linux apps on Windows. You must rebuild your application from source if you want it to run on Windows.
mingw-w64 is not enough, I need a full POSIX platform. I'm also wondering if it's possible to target MSYS2.
Perhaps I'm not understanding correctly, and one doesn't need to compile in Cygwin but only mingw-w64 is necessary.
Thanks!
It is possible to compile for Cygwin from Linux.
The cygwin1.dll itself is built in such way.
Packages/libraries are available at:
https://copr.fedorainfracloud.org/coprs/yselkowitz/cygwin/
Of course only a minimal set of tools/libraries is available
As the title says, I wrote on my linux machine a small application, which should be able to run on Windows and MAC as well.
Since the application is pure Qt, I was hoping that I just need to install additional Qt compilers for Windows and MAC? Without running any VMs or additional Windows/MAC operating systems.
For the Windows targets, you can use the M cross environment.
I have tested it on ubuntu 14.04 LTS and 15.04, working like a charm for building static Qt4 or Qt5 executables.
I am trying to Create an application by using Qt Creator under Linux, I want to have an .exe file that can be run on both Windows and Linux platform ,how can I do this?
Qt Creator provides support for building and running Qt applications for desktop environments (Windows, Linux, FreeBSD and Mac OS) and mobile devices (Android, BlackBerry, Maemo, and MeeGo). Build settings allow you to switch between build targets. For mobile device targets, Qt Creator can generate an installation package, install it to a mobile device that is attached to the development computer and run it there. Installation packages can be published on the Ovi Store.
So you have to seperately build application for windows and linux to run your QT application. You can see more on Creating executable for Windows using Qt on Linux
Thanks & Regards,
Alok Thaker
I developed an app via TideSDK on OSX. I have a .app and It is working on OSX. However, you know it cannot work on linux or windows. I want to run my app on linux or windows. How can I do that?
In short, you package for each platform. As you are aware mac apps do not run on Windows and it is the same with TideSDK since you are creating something native for each platform.
TideSDK must be installed on each platform to create an executable and bundle for it.
To generate an installer for each system, you need to run commands on each system (windows / linux 32bit / linux 64bit) using tidebuilder.py on the command line.
We will have more to speak about concerning packaging quite soon that will make the task of building and distributing your apps easier. Stay tuned for updates !!
Will I have to use the crosstool that cygwin provides to make the libX11.so, libGL.so, and libGLU.so libraries using their respective source code? Or do you know where I can find them compiled already for crosstool (I'm new to this cross compilation)?
Just for clarification: I'm on a windows 7 machine trying to get my application also to compile for linux systems by using cygwin's cross compilation. The application uses OpenGL. Thanks
To cross-compile for Linux you should install the needed development libs and headers on a linux box[1] and then copy /usr/lib and /usr/include your cygwin environment (e.g. /crosscompiler/linux/...). When you build the cross compiler in cygwin, tell it where those native linux headers and libs are so they'll be used when you compile your app.
[1] If you're looking to run on a wide variety of linux boxes make sure you pick an older linux distro (e.g. Red Hat 9) to ensure your app doesn't have dependencies on very new glibc, etc..
Why do you want to use Cygwin?
There is instructions on the OpenGL Wiki about how to use OpenGL on Windows using MinGW.
MinGW use the same GNU tools that are available on Linux (GCC, GDB, GMAKE, etc.) but produce Windows native executables. So, you shouldn't have trouble compiling your source code on both platforms.
I just ended up building on a native Linux machine.