Git Product home page Git Product logo

dmxe's Introduction

Docker MXE

This is an experimental Docker-based version of MXE.

MXE is a nice cross compiling environment with many free libraries. See their site for more.

What do I need?

The only dependency here is Docker itself, everything else will automatically happen inside the Docker container.

Getting started

  1. Clone this repo or download a tarball:

    git clone https://github.com/lbguilherme/dmxe
    cd dmxe
  2. Prepare the MXE image. This will fetch the lastest Debian image and install all dependencies. Then it will clone the mxe repo inside it.

    ./dmxe prepare
  3. Make the libraries you need. This will launch the container and invoke make there with whatever you pass here:

    ./dmxe make gcc
  4. Create your first code to compile with MXE. For example:

    // main.c
    #include <windows.h>
    
    int main() {
    	MessageBoxA(0, "Hello World from Docker MXE!", "MXE", MB_OK);
    	return 0;
    }
  5. Run the image you have just built:

    ./dmxe run

    You will be presented with a shell where you can access your current directory:

    mxe@default:~$
  6. Simply compile your file and exit. i686-w64-mingw32.static-gcc here is the cross compiler for the default target:

    mxe@default:~$ i686-w64-mingw32.static-gcc main.c -o main.exe
    mxe@default:~$ exit
  7. Take a look on the file you have produced:

    file main.exe
    # main.exe: PE32 executable (console) Intel 80386, for MS Windows
  8. Run it! Wine is your friend.

    wine main.exe

    screenshot of main.exe

dmxe's People

Contributors

lbguilherme avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.