Sample Header Ad - 728x90

Cannot cross-compile SDL2 with Mingw-w64 on Ubuntu

0 votes
1 answer
1908 views
SDL downloads I am on Ubuntu using WSL2 and I want to create an executable that will run on Windows. Currently I can build executables for linux just fine. I downloaded the SDL MinGw windows development tools (link above) to my /opt folder. When I execute make cross, I receive this output: for arch in i686-w64-mingw32 x86_64-w64-mingw32; do \ make install-package arch=$arch prefix=/usr/local/$arch; \ done make[1] : Entering directory '/opt/SDL2-2.0.12' *** ERROR: i686-w64-mingw32 or /usr/local/i686-w64-mingw32 does not exist! make[1] : *** [Makefile:21: install-package] Error 1 make[1] : Leaving directory '/opt/SDL2-2.0.12' make[1] : Entering directory '/opt/SDL2-2.0.12' *** ERROR: x86_64-w64-mingw32 or /usr/local/x86_64-w64-mingw32 does not exist! make[1] : *** [Makefile:21: install-package] Error 1 make[1] : Leaving directory '/opt/SDL2-2.0.12' make: *** [Makefile:16: cross] Error 2 If I search for those I get which i686-w64-mingw32-g++ /usr/bin/i686-w64-mingw32-g++ which x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++ /usr/bin is on my path and I see executables with those names in the /opt/SDL2-2.0.12 folder. The genesis of this is when I try to compile my SDL program with x86_64-w64-mingw32-g++ instead of g++.
Asked by smuggledPancakes (103 rep)
Jun 10, 2020, 02:09 PM
Last activity: Jun 10, 2020, 02:41 PM