I used this document that describes what to do in which order. The commands that I issued are:
Code: Select all
emerge --ask sys-devel/crossdev
USE=-sanitize crossdev -t x86_64-w64-mingw32
USE=-sanitize crossdev -t i686-pc-mingw32
The source code of my DLL includes ddraw.h, a DirectX library. Compiling the code for the 64 bit target platform is no problem:
Code: Select all
$ x86_64-w64-mingw32-gcc ddraw.c -c
Code: Select all
$ i686-pc-mingw32-gcc ddraw.c -c
ddraw.c:1:19: fatal error: ddraw.h: No such file or directory
#include <ddraw.h>
^
Code: Select all
$ find /usr/i686-pc-mingw32/ /usr/x86_64-w64-mingw32/ -name dd*.h
/usr/i686-pc-mingw32/usr/include/ddk/ddkmapi.h
/usr/i686-pc-mingw32/usr/include/ddeml.h
/usr/i686-pc-mingw32/usr/include/dde.h
/usr/x86_64-w64-mingw32/usr/include/ddk/dderror.h
/usr/x86_64-w64-mingw32/usr/include/ddrawgdi.h
/usr/x86_64-w64-mingw32/usr/include/ddrawi.h
/usr/x86_64-w64-mingw32/usr/include/ddeml.h
/usr/x86_64-w64-mingw32/usr/include/dde.h
/usr/x86_64-w64-mingw32/usr/include/ddstream.h
/usr/x86_64-w64-mingw32/usr/include/ddraw.h
This is what crossdev spits out if I am recompiling the toolchain:
Code: Select all
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
* crossdev version: 20140917
* Host Portage ARCH: amd64
* Target Portage ARCH: x86
* Target System: i686-pc-mingw32
* Stage: 4 (C/C++ compiler)
* ABIs: default
* binutils: binutils-[latest]
* gcc: gcc-[latest]
* headers: w32api-[latest]
* libc: mingw-runtime-[latest]
* CROSSDEV_OVERLAY: /usr/local/portage
* PORT_LOGDIR: /var/log/portage
* PORTAGE_CONFIGROOT:
* Portage flags:
_ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ -
* leaving metadata/layout.conf alone in /usr/local/portage
_ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ -
!!! WARNING - Cannot auto-configure CHOST i686-pc-mingw32
!!! You should edit /usr/i686-pc-mingw32/etc/portage/make.conf
!!! by hand to complete your configuration
* Log: /var/log/portage/cross-i686-pc-mingw32-binutils.log
* Emerging cross-binutils ... [ ok ]
* Log: /var/log/portage/cross-i686-pc-mingw32-w32api-quick.log
* Emerging cross-w32api-quick ... [ ok ]
* Log: /var/log/portage/cross-i686-pc-mingw32-mingw-runtime-headers.log
* Emerging cross-mingw-runtime-headers ... [ ok ]
* Log: /var/log/portage/cross-i686-pc-mingw32-gcc-stage1.log
* Emerging cross-gcc-stage1 ... [ ok ]
* Log: /var/log/portage/cross-i686-pc-mingw32-w32api.log
* Emerging cross-w32api ... [ ok ]
* Log: /var/log/portage/cross-i686-pc-mingw32-mingw-runtime.log
* Emerging cross-mingw-runtime ... [ ok ]
* Log: /var/log/portage/cross-i686-pc-mingw32-gcc-stage2.log
* Emerging cross-gcc-stage2 ... [ ok ]

