Tuesday, October 4, 2016

cross compile windows application on linux using mingw

below, i will compile mdf2iso (utility to convert mdf to iso / cue / toc images) on linux machine, that generate windows executable file (exe) and we can use the file to run the windows system.

1- install packages
$ sudo apt-get install gcc-mingw-w64-i686 g++-mingw-w64-i686

2- download mdf2iso source from ubuntu repository
$ apt-get source mdf2iso

3- compile it
$ cd mdf2iso
$ export gcc-mingw-w64-i686 g++-mingw-w64-i686
$ ./configure --prefix=`pwd`/output
$ make
$ make install

4- the output file will be stored int the current directory / output / bin
$ ls output/bin/

-- snapshot of running the binary file that we compile above on windows 7

No comments:

Post a Comment