mingw-cross-env-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Mingw-cross-env-list] which package provides QT4 qmake.exe


From: Rashad M
Subject: Re: [Mingw-cross-env-list] which package provides QT4 qmake.exe
Date: Thu, 22 Oct 2015 12:45:49 +0200

Hello,

As Martin, said cmake check for qmake , rcc etc. If you have a gui applications with translations  it needed lupdate, lrelease.exe also.

On Thu, Oct 22, 2015 at 9:12 AM, Martin Müllenhaupt <address@hidden> wrote:
Hi Rashad,

On Wednesday, October 21, 2015 12:24:16 PM Rashad M wrote:
> I have qt4 cross compiled with mxe. But when I look into
> <mxe-target-dir>/qt/bin/ qmake is not native. It is not a windows
> executable.

I think, mxe is not suitable for building development packages (dll+headers)
for using in Windows. The most important issue will be non-portability for C++
dlls across compilers (C dlls might work though).
The qt dlls might be usable using a similar MinGW compiler on Windows. But if
you use MSVC, your qt dlls from mxe will be useless, since MSVC could not link
them.

I used them build my project. I installed cmake, mingw-64 (7zip archive from sourceforge) and along with the mxe target dir containing all dll and headers. It is working without any issue.

For the Qt one which I have a fix for which I am not so proud of. But I thought to share in case if someone finds useful.

I copied the source of qt4 from mxe/src/qt-opensource-everywhere-4.8.6.tar.gz to  my windows.

I extracted it and compiled only qmake, moc, rcc, uic, lrelease.  These does not link to any other Qt specific library. So I guess I am safe as long as I use a mingw compiler to do the task on windows.


<pre>
cd %QT_SOURCE_DIR%

configure.exe -opensource -confirm-license -system-libtiff -system-libjpeg -system-libpng -no-freetype -system-zlib -no-iconv -opengl desktop -fast -release -exceptions -shared -no-audio-backend -no-multimedia -no-script -no-webkit -no-phonon -no-phonon-backend -nomake docs -nomake examples

cd %QT_TOOLS_DIR%\boostrap
make
cd %QT_TOOLS_DIR%\moc
make
cd %QT_TOOLS_DIR%\rcc
make
cd %QT_TOOLS_DIR%\uic
make
cd %QT_TOOLS_DIR%\idc
make

cd %QT_LINGUIST_DIR%\lrelease
make

cp %DEV_HOME%\lupdate_Makefile.Release %QT_LINGUIST_DIR%\lupdate\Makefile.Release

cd %QT_LINGUIST_DIR%\lupdate
make

copy %QT_SOURCE_DIR%\bin\qmake.exe %DEST_DIR%\
copy %QT_SOURCE_DIR%\bin\moc.exe %DEST_DIR%\
copy %QT_SOURCE_DIR%\bin\rcc.exe %DEST_DIR%\
copy %QT_SOURCE_DIR%\bin\uic.exe %DEST_DIR%\
copy %QT_SOURCE_DIR%\bin\idc.exe %DEST_DIR%\
copy %QT_SOURCE_DIR%\bin\lrelease.exe %DEST_DIR%\
copy %QT_SOURCE_DIR%\bin\lupdate.exe %DEST_DIR%\

</pre>


The qmake executable is not native for Windows, since it is a qt installation
for cross compiling. You compile your project on *nix and run it on Windows.
For compiling on *nix you need a qmake executable which runs on *nix.

You could try to cross compile your whole project using mxe.
I use CMake successfully for cross compiling a lot of my projects.

If you need a ready-made Qt installation for Windows, there are pre-built
packages available from the qt website.

If you still want to compile a qmake.exe from mxe, there might be configure
options for the qt library, but I doubt that.

Regards

Martin





--
Regards,
   Rashad

reply via email to

[Prev in Thread] Current Thread [Next in Thread]