How to make an .exe in linux and qt

0

Last mistake I get when doing make: I've already done the mxe root and the make thing but when doing the make it gives me this

  

make [1]: i686-w64-mingw32.static-g ++: The program was not found   Makefile.Release: 333: failure in the instructions for the objective   'release / main.o' make [1]: * [release / main.o] Error 127 make [1]:   leaves the directory '/ home / omar / Desktop / Board member / binder'   Makefile: 34: failure in the instructions for the 'release' objective   make: * [release] Error 2

I do not know why

  

MXE Warning! Downloading freetds from backup.

     

Download failed or wrong checksum of package freetds!

     

- 2016-12-17 00: 25: 37-- link   Resolving d1yihgixbnrglp.cloudfront.net   (d1yihgixbnrglp.cloudfront.net) ... 54.230.216.115, 54.230.216.109,   54.230.216.205, ... Connecting with d1yihgixbnrglp.cloudfront.net (d1yihgixbnrglp.cloudfront.net) [54.230.216.115]: 80 ... connected.   HTTP request sent, waiting for an answer ... 404 Not Found 2016-12-17   00:25:37 ERROR 404: Not Found. Download failed!   -------------------------------------------------- ---------- [log] / home / omar / Desktop / mxe / log / freetds-download

     

Makefile: 488: failure in the instructions for the objective   'download-only-freetds-1.00.23.tar.bz2' make: ***   [download-only-freetds-1.00.23.tar.bz2] Error 1

It shows me the following error when I make make qtbase:

  

bash: autoconf: the order Wrong version of requirement was not found:   autoconf bash: automake: the order Wrong version of   requirement: automake

     

Please have a look at "docs / index.html" to ensure that your system   meets all requirements.

     

Makefile: 376: failure in the instructions for the goal   '/ home / omar / Desktop / mxe / usr / installed / check-requirements' make: ***   [/ home / omar / Desktop / mxe / usr / installed / check-requirements] Error 1

I want that when I compile I get an .exe file compatible with windows because the compilation in linux is not compatible with windows. For that I have been looking for information on cross-compiling the compilation in different platforms and I found how to do it from the following stackoverflow link:

link

But I still do not understand very well how to do it. Many of these commands where I'll use them in Linux (from the terminal?) And in what location I'm sorry but I'm a bit lost. When I say commands, I mean:

cd mxe && make qtbase

Here I should put in which part I should put the location of my application:

<mxe root>/usr/bin/i686-w64-mingw32.static-qmake-qt5

If someone can explain to me more or less how I could compile an .exe for linux in an understandable way or tell me exactly what to do with each thing since I do not know how to carry it out yet.

    
asked by jeronimo urtado 15.12.2016 в 03:42
source

1 answer

2
  • Download the application using the following command, it will be downloaded into a folder called mxe :

    git clone link

  • Then you must install the dependencies, in this link they are, there are some recommendations for more knowledge distributions, but you will have to Find the name of the package in your distribution.

  • You must enter the folder mxe and compile the file with the help of your makefile, all this is done with the following command (qtbase is the base package, if you want other packages write them to your side, in the previous link there is a part where it says List of Packages where the names of other packages are found):

    cd mxe & & amp; make qtbase

  • Now open a terminal in the folder of your project, verify that only the source files are found, not intermediate files like .pro.user , .o or others that you have generated when compiling it in linux and then execute the following command ( where {mxe root} is the path of the folder where you downloaded mxe ), this action will generate a makefile but for windows:

    {mxe root} /usr/bin/i686-w64-mingw32.static-qmake-qt5

  • Then run make to compile.

  • Observations: if you get an error because you can not find any file you can link that file that must be found in the mxe folder to the /usr/bin folder:

    ln -s {mxe root}/usr/bin/i686-w64-mingw32.static-ar /usr/bin
    ln -s {mxe root}/usr/bin/i686-w64-mingw32.static-qmake-qt5 /usr/bin
    ln -s {mxe root}/usr/bin/i686-w64-mingw32.static-g++  /usr/bin  
    ln -s {mxe root}/usr/bin/i686-w64-mingw32.static-windres /usr/bin
    ln -s {mxe root}/usr/bin/i686-w64-mingw32.static-gcc /usr/bin     
    

    You can also use wine to run your executable.

        
    answered by 15.12.2016 / 07:02
    source