www.mingw.org
MinGW cross compiling environment.
Step 1: Download and Unpack
#git clone -b stable https://github.com/mxe/mxe.git
Step 2: System-wide Installation (optional)
保证在/opt/mxe 下安装
#su
#mv /opt/mxe /opt/mxe.old
#exit
#su
#mv mxe /opt/mxe
#exit
Step 3: Build MXE
#make
#make gcc glib gtk+-2.0 ---- (#make gtk lua libidn)
Step 4: Environment Variables
#vim ~/.bashrc $PATH的导入
export PATH=/where MXE is installed/usr/bin:$PATH
export PKG_CONFIG_PATH="entries for native builds"
export PKG_CONFIG_PATH_i686_pc_mingw32="entries for MXE builds
If you have a handwritten Makefile, you probably will have to make a few adjustments to it:
CC=$(CROSS)gcc
LD=$(CROSS)ld
AR=$(CROSS)ar
PKG_CONFIG=$(CROSS)pkg-config
make CROSS=i686-pc-mingw32-
MinGW cross compiling environment.
Step 1: Download and Unpack
#git clone -b stable https://github.com/mxe/mxe.git
Step 2: System-wide Installation (optional)
保证在/opt/mxe 下安装
#su
#mv /opt/mxe /opt/mxe.old
#exit
#su
#mv mxe /opt/mxe
#exit
Step 3: Build MXE
#make
#make gcc glib gtk+-2.0 ---- (#make gtk lua libidn)
Step 4: Environment Variables
#vim ~/.bashrc $PATH的导入
export PATH=/where MXE is installed/usr/bin:$PATH
export PKG_CONFIG_PATH="entries for native builds"
export PKG_CONFIG_PATH_i686_pc_mingw32="entries for MXE builds
If you have a handwritten Makefile, you probably will have to make a few adjustments to it:
CC=$(CROSS)gcc
LD=$(CROSS)ld
AR=$(CROSS)ar
PKG_CONFIG=$(CROSS)pkg-config
make CROSS=i686-pc-mingw32-