I would like to try to compile for windows with Mxe.
Just install Qtbase or is Qt5 necessary?
Do I have to compile the sources or can I install the binaries,
because i tried with binaries but i can't get it to work.
I found this procedure with sources to be correct:
1) git clone -b stable https://github.com/mxe/mxe.git
2) apt-get install \
autoconf \
automake \
autopoint \
bash \
bison \
bzip2 \
flex \
g ++ \
g ++ - multilib \
gettext \
git \
gperf \
intltool \
libc6-dev-i386 \
libgdk-pixbuf2.0-dev \
libltdl-dev \
libssl-dev \
libtool-bin \
libxml-parser-perl \
lzip \
make \
openssl \
p7zip-full \
patch \
perl \
python \
ruby \
sed \
unzip \
wget \
xz-utils
3) cd mxe && make MXE_TARGETS = x86_64-w64-mingw32.shared MXE_PLUGIN_DIRS = plugins / gcc10 qt5
4) export PATH=/usr/bin:$PATH
5) / usr / i686-pc-mingw32 / qt / bin / qmake && make (To compile from the terminal)
Configure Qt Creator
Qt Creator is a fully-featured IDE for developing Qt applications. If you choose, you can build a Windows executable from
within Qt Creator simply by calling your cross-compiled qmake tool instead of the default qmake tool.
Open the Build Settings panel for your project and add a new Release configuration. Under Build Steps, remove the
qmake step and replace it with a Custom Process Step. Add the following parameters:
• Command: Path to the qmake tool generated by MXE ( /usr/i686-w64-mingw32.static/qt5/bin
/ qmake)
• Arguments: Path to your project's main file (% {CurrentProject: FilePath})
• Working directory: Where to place the executable (I use% {buildDir})
Make sure to change the Build directory and rename the configuration to something meaningful. Now, press Ctrl-B to try
building your project. Congratulations, you can now build Windows applications in Linux!
Greetings
Just install Qtbase or is Qt5 necessary?
Do I have to compile the sources or can I install the binaries,
because i tried with binaries but i can't get it to work.
I found this procedure with sources to be correct:
1) git clone -b stable https://github.com/mxe/mxe.git
2) apt-get install \
autoconf \
automake \
autopoint \
bash \
bison \
bzip2 \
flex \
g ++ \
g ++ - multilib \
gettext \
git \
gperf \
intltool \
libc6-dev-i386 \
libgdk-pixbuf2.0-dev \
libltdl-dev \
libssl-dev \
libtool-bin \
libxml-parser-perl \
lzip \
make \
openssl \
p7zip-full \
patch \
perl \
python \
ruby \
sed \
unzip \
wget \
xz-utils
3) cd mxe && make MXE_TARGETS = x86_64-w64-mingw32.shared MXE_PLUGIN_DIRS = plugins / gcc10 qt5
4) export PATH=/usr/bin:$PATH
5) / usr / i686-pc-mingw32 / qt / bin / qmake && make (To compile from the terminal)
Configure Qt Creator
Qt Creator is a fully-featured IDE for developing Qt applications. If you choose, you can build a Windows executable from
within Qt Creator simply by calling your cross-compiled qmake tool instead of the default qmake tool.
Open the Build Settings panel for your project and add a new Release configuration. Under Build Steps, remove the
qmake step and replace it with a Custom Process Step. Add the following parameters:
• Command: Path to the qmake tool generated by MXE ( /usr/i686-w64-mingw32.static/qt5/bin
/ qmake)
• Arguments: Path to your project's main file (% {CurrentProject: FilePath})
• Working directory: Where to place the executable (I use% {buildDir})
Make sure to change the Build directory and rename the configuration to something meaningful. Now, press Ctrl-B to try
building your project. Congratulations, you can now build Windows applications in Linux!
Greetings