Skip to content

Latest commit

 

History

History
55 lines (34 loc) · 1.76 KB

BUILD.md

File metadata and controls

55 lines (34 loc) · 1.76 KB

Dependencies

Required:

  • MinGW-w64 toolchain

    • win32 threads (as opposed to posix threads) is recommended to avoid dependency on libwinpthread-1.dll
  • CMake

Optional:

Cross-compilation toolchain

I always build DrMinGW from Linux with MinGW cross-compilation toolchain. See here for details.

BFD

BFD headers are not typically included in native/cross MinGW distributions. Binaries are but they too have several undesired dependencies. So the best approach is to build BFD from source.

These are roughly the steps (again, assuming a cross-compilation MinGW toolchain):

wget http://ftp.gnu.org/gnu/binutils/binutils-2.23.2.tar.bz2
tar -xjf binutils-2.23.2.tar.bz2
cd binutils-2.23.2
./configure --host i686-w64-mingw32 --disable-nls --prefix=/
make
make install DESTDIR=$PWD/publish

Native toolchain

It is also possible to build with a native MinGW toolchain, by doing:

set Path=C:\path\to\mingw32\bin;%Path%
cmake -G "MinGW Makefiles" -H. -Bbuild
cmake --build build

These instructions have been tested with this MinGW-w64 toolchain, but in theory it should work with any flavour of MinGW-w64 native toolchain, provided that it includes a native mingw32-make.exe.

Note that building with MSYS or Cygwin is not necessary nor supported.