Cross Compiling with MXE. Linux -> Windows

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

Post Reply
Joopjr
Engineer
Engineer
Posts: 7
Joined: 11 Jul 2009 18:52

Cross Compiling with MXE. Linux -> Windows

Post by Joopjr »

I'm trying to compile the OTTD source code to a 32 bit Windows Executable on a Linux (ubuntu) machine for a project I'm working on. I've used the wiki.

The configure is as follows:
[+] Spoiler

Code: Select all

openttd-1.7.1# export PATH="/usr/local/mxe/usr/bin:$PATH"
openttd-1.7.1# ./configure --host=i686-w64-mingw32.static --pkg-config=i686-w64-mingw32.static-pkg-config --enable-static --with-lzo2=/usr/local/mxe/usr/i686-w64-mingw32.static/lib/liblzo2.a
checking awk... awk
detecting OS... MINGW
checking build system type... x86_64-linux-gnu
checking host system type... i686-w64-mingw32.static
checking universal build... no
checking build cc... gcc
checking host cc... i686-w64-mingw32.static-gcc
checking build c++... g++
checking host c++... i686-w64-mingw32.static-g++
checking host windres... i686-w64-mingw32.static-windres
checking host strip... i686-w64-mingw32.static-strip
checking builtin depend... yes
checking makedepend... disabled
detecting cpu-type... 32 bits
detecting SSE... found
checking static... yes
checking unicode... yes
using debug level... no
using desync debug level... no
using link time optimization... no
checking OSX sysroot... not OSX, skipping
checking allegro... not found
checking sdl... not found
checking COCOA... not OSX, skipping
checking GDI video driver... found
checking dedicated... not selected
checking console application... disabled (only used when forced)
checking network... found
checking squirrel... found
checking translator... no
checking assert... disabled
checking zlib... found
checking liblzma... found
checking lzo2... found
checking libxdg-basedir... not found
checking libpng... found
checking freetype2... found
checking libfontconfig... WIN32, skipping
checking icu-lx... found
checking icu-i18n... found
checking psp-config... not PSP, skipping
checking libtimidity... not found
checking direct-music... not found
checking sort... sort
checking endianness... AUTO
suppress language errors... no
checking stripping... i686-w64-mingw32.static-strip -s
checking distcc... no (only used when forced)
checking ccache... no (only used when forced)
checking grfcodec... needs at least version 6.0.5 (r985), disabled
checking nforenum... needs at least version 6.0.5 (r985), disabled
checking OSX application bundle... not OSX, skipping
checking revision... source tarball
checking iconv... not OSX, skipping
personal home directory... OpenTTD
shared data directory... none
installation directory... /
icon theme directory... none
manual page directory... none
menu item directory... none
using CFLAGS_BUILD...  -Wall -Wno-multichar -Wsign-compare -Wundef -Wwrite-strings -Wpointer-arith -W -Wno-unused-parameter -Wredundant-decls -Wformat=2 -Wformat-security -Wno-unused-variable -Wno-unused-but-set-variable -Wno-unused-but-set-parameter -Winit-self -fno-strict-aliasing -Wcast-qual -fno-strict-overflow -Wnon-virtual-dtor -Wno-free-nonheap-object -rdynamic -DMINGW -D_FORTIFY_SOURCE=2 -O1 -DNDEBUG
using CXXFLAGS_BUILD...  -std=gnu++0x
using LDFLAGS_BUILD...  -rdynamic -static-libgcc -static-libstdc++
using CFLAGS... -O2 -fomit-frame-pointer  -Wall -Wno-multichar -Wsign-compare -Wundef -Wwrite-strings -Wpointer-arith -W -Wno-unused-parameter -Wredundant-decls -Wformat=2 -Wformat-security -Wno-unused-variable -Wno-unused-but-set-variable -Wno-unused-but-set-parameter -Winit-self -fno-strict-aliasing -Wcast-qual -fno-strict-overflow -Wnon-virtual-dtor -Wno-free-nonheap-object -DMINGW -D_FORTIFY_SOURCE=2 -DWITH_SSE -mno-ms-bitfields -DWIN -DWITH_ZLIB    -DWITH_LZMA    -DLZMA_API_STATIC -DWITH_LZO -I/var/www/vhosts/jjr-ict.com/ottdpatch.jjr-ict.com/cronjob/1/openttd-1.7.1/src/3rdparty/squirrel/include -DWITH_PNG -I/usr/local/mxe/usr/i686-w64-mingw32.static/include/libpng16    -DWITH_FREETYPE -I/usr/local/mxe/usr/i686-w64-mingw32.static/include/freetype2    -DWITH_ICU_LAYOUT    -DWITH_ICU_SORT    -DUNICODE -D_UNICODE -DENABLE_NETWORK -DNDEBUG -DWITH_PERSONAL_DIR -DPERSONAL_DIR=\"OpenTTD\" -DGLOBAL_DATA_DIR=\"/usr/local/share/games/openttd\"
using CXXFLAGS...  -std=gnu++0x
using LDFLAGS... -lstdc++ -lws2_32 -lwinmm -lgdi32 -ldxguid -lole32 -limm32 -lz    -llzma    /usr/local/mxe/usr/i686-w64-mingw32.static/lib/liblzo2.a -lpng16 -lz    -lharfbuzz -lcairo -lgobject-2.0 -lfontconfig -lusp10 -lmsimg32 -lgdi32 -lpixman-1 -L/usr/local/mxe/usr/i686-w64-mingw32.static/lib/../lib -lffi -lexpat -lfreetype -lbz2 -lpng16 -lz -lharfbuzz_too -lfreetype_too -lglib-2.0 -lws2_32 -lole32 -lwinmm -lshlwapi -lpcre -lintl -liconv    -lsiculx -lsicule -lsicuuc -lsicudt -lpthread -lm  -lstdc++    -lsicuin -lsicuuc -lsicudt -lpthread -lm  -lstdc++     -Wl,--subsystem,windows -static
Generating Makefile...
Generating lang/Makefile...
Generating setting/Makefile...
Generating grf/Makefile...
Generating objs/Makefile...
The make command throws the following warning:

Code: Select all

[SRC] Compiling 3rdparty/squirrel/squirrel/sqfuncstate.cpp
openttd-1.7.1/src/3rdparty/squirrel/squirrel/sqfuncstate.cpp: In function 'void DumpLiteral(SQObjectPtr&)':
openttd-1.7.1/src/3rdparty/squirrel/squirrel/sqfuncstate.cpp:88:60: warning: format '%d' expects argument of type 'int', but argument 2 has type 'SQInteger {aka long long int}' [-Wformat=]
   case OT_INTEGER: printf("{" OTTD_PRINTF64 "}",_integer(o));break;
It eventually will create a executable .exe in the bin folder. But this will simply not launch on a windows machine.

Am I missing something? Does anybody know why this doesn't work?
pelya
Transport Coordinator
Transport Coordinator
Posts: 342
Joined: 18 Nov 2010 19:48
Contact:

Re: Cross Compiling with MXE. Linux -> Windows

Post by pelya »

The 32-bit Windows executable cross-compiled with MXE also did not start on my setup. But I've got 64-bit version working, without MXE.

You can use this source archive to cross-compile 64-bit version, it includes all precompiled Windows libraries OpenTTD will need.
It generates one huge .exe file with no .dll dependencies, at least it runs okay on Windows 10 tablet:

https://sourceforge.net/projects/libsdl ... z/download

You will first need to install the cross-compiler:

Code: Select all

sudo apt-get install g++-mingw-w64
Replace OpenTTD sources in directory openttd-mingw/openttd with your own, then go to the directory openttd-mingw/build and run:

Code: Select all

./configure.sh
make -j4 VERBOSE=1 LIBS='-lsicuuc -lsiculx -lsicutu -lsicuuc -lsicuin -lsicudt -lsicuuc -lsiculx -lsicutu -lsicuuc  -licu-le-hb -lharfbuzz -lpng -limm32 -lz -lfreetype -lgdi32 -llzma -lwinmm -llzo2 -lws2_32'
User avatar
adf88
Chief Executive
Chief Executive
Posts: 644
Joined: 14 Jan 2008 15:51
Location: PL

Re: Cross Compiling with MXE. Linux -> Windows

Post by adf88 »

Everything OK on my machine (Lubuntu/Win7).

What exact source code do you have? What revision? What exact patches?
Have you tried compiling natively first?
Have you tried running in WINE?
How does "simply not launch" look like exactly?
Can you upload the binary?
:] don't worry, be happy and checkout my patches
pelya
Transport Coordinator
Transport Coordinator
Posts: 342
Joined: 18 Nov 2010 19:48
Contact:

Re: Cross Compiling with MXE. Linux -> Windows

Post by pelya »

I've uses 1.7.1 official source tarball. I've attached the resulting exe file, it crashes when I try to launch it using Wine, and my previous build crashed on Windows 10 laptop. If you could figure out what's wrong with it that would be great, I don't want to cross-compile all the libraries manually, MXE would be an awesome thing if it would actually work.

These are my steps, the only difference from the wiki is that I did not install it into /usr/local:

Code: Select all

git clone http://github.com/mxe/mxe.git
cd mxe
make -j4 gcc zlib libpng lzo freetype xz icu4c
cd ..
cd openttd-1.7.1

export PATH=`pwd`/../mxe/usr/bin:$PATH
export PKG_CONFIG_PATH=`pwd`/../mxe/usr/i686-w64-mingw32.static/lib/pkgconfig

./configure \
   --host=i686-w64-mingw32.static \
   --pkg-config=i686-w64-mingw32.static-pkg-config \
   --enable-static \
   --with-lzo2=`pwd`/../mxe/usr/i686-w64-mingw32.static/lib/liblzo2.a

make -j4 VERBOSE=1
Attachments
openttd.exe.zip
OpenTTD Win32 built with MXE
(3.17 MiB) Downloaded 170 times
Joopjr
Engineer
Engineer
Posts: 7
Joined: 11 Jul 2009 18:52

Re: Cross Compiling with MXE. Linux -> Windows

Post by Joopjr »

adf88 wrote:What exact source code do you have? What revision? What exact patches?
It will even fail when i don't include any patches. I'm using the latest stable release.
[+] Spoiler

Code: Select all

/# wget http://ftp.snt.utwente.nl/pub/games/openttd/binaries/releases/1.7.1/openttd-1.7.1-source.tar.xz
/# tar xvfJ openttd-1.7.1-source.tar.xz
/# cd openttd-1.7.1
/openttd-1.7.1# export PATH="/usr/local/mxe/usr/bin:$PATH"
/openttd-1.7.1# ./configure --host=i686-w64-mingw32.static --pkg-config=i686-w64-mingw32.static-pkg-config --enable-static --with-lzo2=/usr/local/mxe/usr/i686-w64-mingw32.static/lib/liblzo2.a
checking awk... awk
detecting OS... MINGW
checking build system type... x86_64-linux-gnu
checking host system type... i686-w64-mingw32.static
checking universal build... no
checking build cc... gcc
checking host cc... i686-w64-mingw32.static-gcc
checking build c++... g++
checking host c++... i686-w64-mingw32.static-g++
checking host windres... i686-w64-mingw32.static-windres
checking host strip... i686-w64-mingw32.static-strip
checking builtin depend... yes
checking makedepend... disabled
detecting cpu-type... 32 bits
detecting SSE... found
checking static... yes
checking unicode... yes
using debug level... no
using desync debug level... no
using link time optimization... no
checking OSX sysroot... not OSX, skipping
checking allegro... not found
checking sdl... not found
checking COCOA... not OSX, skipping
checking GDI video driver... found
checking dedicated... not selected
checking console application... disabled (only used when forced)
checking network... found
checking squirrel... found
checking translator... no
checking assert... disabled
checking zlib... found
checking liblzma... found
checking lzo2... found
checking libxdg-basedir... not found
checking libpng... found
checking freetype2... found
checking libfontconfig... WIN32, skipping
checking icu-lx... found
checking icu-i18n... found
checking psp-config... not PSP, skipping
checking libtimidity... not found
checking direct-music... not found
checking sort... sort
checking endianness... AUTO
suppress language errors... no
checking stripping... i686-w64-mingw32.static-strip -s
checking distcc... no (only used when forced)
checking ccache... no (only used when forced)
checking grfcodec... needs at least version 6.0.5 (r985), disabled
checking nforenum... needs at least version 6.0.5 (r985), disabled
checking OSX application bundle... not OSX, skipping
checking revision... source tarball
checking iconv... not OSX, skipping
personal home directory... OpenTTD
shared data directory... none
installation directory... /
icon theme directory... none
manual page directory... none
menu item directory... none
using CFLAGS_BUILD...  -Wall -Wno-multichar -Wsign-compare -Wundef -Wwrite-strings -Wpointer-arith -W -Wno-unused-parameter -Wredundant-decls -Wformat=2 -Wformat-security -Wno-unused-variable -Wno-unused-but-set-variable -Wno-unused-but-set-parameter -Winit-self -fno-strict-aliasing -Wcast-qual -fno-strict-overflow -Wnon-virtual-dtor -Wno-free-nonheap-object -rdynamic -DMINGW -D_FORTIFY_SOURCE=2 -O1 -DNDEBUG
using CXXFLAGS_BUILD...  -std=gnu++0x
using LDFLAGS_BUILD...  -rdynamic -static-libgcc -static-libstdc++
using CFLAGS... -O2 -fomit-frame-pointer  -Wall -Wno-multichar -Wsign-compare -Wundef -Wwrite-strings -Wpointer-arith -W -Wno-unused-parameter -Wredundant-decls -Wformat=2 -Wformat-security -Wno-unused-variable -Wno-unused-but-set-variable -Wno-unused-but-set-parameter -Winit-self -fno-strict-aliasing -Wcast-qual -fno-strict-overflow -Wnon-virtual-dtor -Wno-free-nonheap-object -DMINGW -D_FORTIFY_SOURCE=2 -DWITH_SSE -mno-ms-bitfields -DWIN -DWITH_ZLIB    -DWITH_LZMA    -DLZMA_API_STATIC -DWITH_LZO -I/openttd-1.7.1/src/3rdparty/squirrel/include -DWITH_PNG -I/usr/local/mxe/usr/i686-w64-mingw32.static/include/libpng16    -DWITH_FREETYPE -I/usr/local/mxe/usr/i686-w64-mingw32.static/include/freetype2    -DWITH_ICU_LAYOUT    -DWITH_ICU_SORT    -DUNICODE -D_UNICODE -DENABLE_NETWORK -DNDEBUG -DWITH_PERSONAL_DIR -DPERSONAL_DIR=\"OpenTTD\" -DGLOBAL_DATA_DIR=\"/usr/local/share/games/openttd\"
using CXXFLAGS...  -std=gnu++0x
using LDFLAGS... -lstdc++ -lws2_32 -lwinmm -lgdi32 -ldxguid -lole32 -limm32 -lz    -llzma    /usr/local/mxe/usr/i686-w64-mingw32.static/lib/liblzo2.a -lpng16 -lz    -lharfbuzz -lcairo -lgobject-2.0 -lfontconfig -lusp10 -lmsimg32 -lgdi32 -lpixman-1 -L/usr/local/mxe/usr/i686-w64-mingw32.static/lib/../lib -lffi -lexpat -lfreetype -lbz2 -lpng16 -lz -lharfbuzz_too -lfreetype_too -lglib-2.0 -lws2_32 -lole32 -lwinmm -lshlwapi -lpcre -lintl -liconv    -lsiculx -lsicule -lsicuuc -lsicudt -lpthread -lm  -lstdc++    -lsicuin -lsicuuc -lsicudt -lpthread -lm  -lstdc++     -Wl,--subsystem,windows -static
Generating Makefile...
Generating lang/Makefile...
Generating setting/Makefile...
Generating grf/Makefile...
Generating objs/Makefile...
/openttd-1.7.1# make
make[1]: Entering directory `/openttd-1.7.1/objs/lang'
[LANG] Compiling and Linking endian_check.exe
[LANG] Testing endianness for host
[LANG] Compiling core/alloc_func.cpp
[LANG] Compiling string.cpp
[LANG] Compiling strgen/strgen_base.cpp
[LANG] Compiling strgen/strgen.cpp
[LANG] Compiling getoptdata.cpp
[LANG] Compiling and Linking strgen.exe
[LANG] Generating table/strings.h
[LANG] Compiling language afrikaans
[LANG] Compiling language arabic_egypt
[LANG] Compiling language basque
[LANG] Compiling language belarusian
[LANG] Compiling language brazilian_portuguese
[LANG] Compiling language bulgarian
[LANG] Compiling language catalan
[LANG] Compiling language croatian
[LANG] Compiling language czech
[LANG] Compiling language danish
[LANG] Compiling language dutch
[LANG] Compiling language english_AU
[LANG] Compiling language english
[LANG] Compiling language english_US
[LANG] Compiling language esperanto
[LANG] Compiling language estonian
[LANG] Compiling language faroese
[LANG] Compiling language finnish
[LANG] Compiling language french
[LANG] Compiling language gaelic
[LANG] Compiling language galician
[LANG] Compiling language german
[LANG] Compiling language greek
[LANG] Compiling language hebrew
[LANG] Compiling language hungarian
[LANG] Compiling language icelandic
[LANG] Compiling language indonesian
[LANG] Compiling language irish
[LANG] Compiling language italian
[LANG] Compiling language japanese
[LANG] Compiling language korean
[LANG] Compiling language latin
[LANG] Compiling language latvian
[LANG] Compiling language lithuanian
[LANG] Compiling language luxembourgish
[LANG] Compiling language malay
[LANG] Compiling language norwegian_bokmal
[LANG] Compiling language norwegian_nynorsk
[LANG] Compiling language polish
[LANG] Compiling language portuguese
[LANG] Compiling language romanian
[LANG] Compiling language russian
[LANG] Compiling language serbian
[LANG] Compiling language simplified_chinese
[LANG] Compiling language slovak
[LANG] Compiling language slovenian
[LANG] Compiling language spanish_MX
[LANG] Compiling language spanish
[LANG] Compiling language swedish
[LANG] Compiling language tamil
[LANG] Compiling language thai
[LANG] Compiling language traditional_chinese
[LANG] Compiling language turkish
[LANG] Compiling language ukrainian
[LANG] Compiling language vietnamese
[LANG] Compiling language welsh
make[1]: Leaving directory `/openttd-1.7.1/objs/lang'
make[1]: Entering directory `/openttd-1.7.1/objs/setting'
[SETTING] Compiling and Linking endian_check.exe
[SETTING] Testing endianness for host
[SETTING] Compiling core/alloc_func.cpp
[SETTING] Compiling string.cpp
[SETTING] Compiling ini_load.cpp
[SETTING] Compiling settingsgen/settingsgen.cpp
[SETTING] Compiling getoptdata.cpp
[SETTING] Compiling and Linking settings_gen.exe
[SETTING] Generating table/settings.h
make[1]: Leaving directory `/openttd-1.7.1/objs/setting'
make[1]: Entering directory `/openttd-1.7.1/objs/extra_grf'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/openttd-1.7.1/objs/extra_grf'
make[1]: Entering directory `/openttd-1.7.1/objs/release'
[SRC] Compiling and Linking endian_check.exe
[SRC] Testing endianness for target
[SRC] Compiling and linking depend.exe
[SRC] DEP CHECK (all files)
make[1]: Leaving directory `/openttd-1.7.1/objs/release'
make[1]: Entering directory `/openttd-1.7.1/objs/release'
[SRC] Compiling 3rdparty/md5/md5.cpp
[SRC] Compiling 3rdparty/squirrel/sqstdlib/sqstdaux.cpp
[SRC] Compiling 3rdparty/squirrel/sqstdlib/sqstdmath.cpp
[SRC] Compiling 3rdparty/squirrel/squirrel/sqapi.cpp
[SRC] Compiling 3rdparty/squirrel/squirrel/sqbaselib.cpp
[SRC] Compiling 3rdparty/squirrel/squirrel/sqclass.cpp
[SRC] Compiling 3rdparty/squirrel/squirrel/sqcompiler.cpp
[SRC] Compiling 3rdparty/squirrel/squirrel/sqdebug.cpp
[SRC] Compiling 3rdparty/squirrel/squirrel/sqfuncstate.cpp
/openttd-1.7.1/src/3rdparty/squirrel/squirrel/sqfuncstate.cpp: In function 'void DumpLiteral(SQObjectPtr&)':
/openttd-1.7.1/src/3rdparty/squirrel/squirrel/sqfuncstate.cpp:88:60: warning: format '%d' expects argument of type 'int', but argument 2 has type 'SQInteger {aka long long int}' [-Wformat=]
   case OT_INTEGER: printf("{" OTTD_PRINTF64 "}",_integer(o));break;
                                                            ^
[SRC] Compiling 3rdparty/squirrel/squirrel/sqlexer.cpp
[SRC] Compiling 3rdparty/squirrel/squirrel/sqmem.cpp
[SRC] Compiling 3rdparty/squirrel/squirrel/sqobject.cpp
[SRC] Compiling 3rdparty/squirrel/squirrel/sqstate.cpp
[SRC] Compiling 3rdparty/squirrel/squirrel/sqtable.cpp
[SRC] Compiling 3rdparty/squirrel/squirrel/sqvm.cpp
[SRC] Compiling ai/ai_config.cpp
[SRC] Compiling ai/ai_core.cpp
[SRC] Compiling ai/ai_gui.cpp
[SRC] Compiling ai/ai_info.cpp
[SRC] Compiling ai/ai_instance.cpp
[SRC] Compiling ai/ai_scanner.cpp
[SRC] Compiling aircraft_cmd.cpp
[SRC] Compiling aircraft_gui.cpp
[SRC] Compiling airport.cpp
[SRC] Compiling airport_gui.cpp
[SRC] Compiling animated_tile.cpp
[SRC] Compiling articulated_vehicles.cpp
[SRC] Compiling autoreplace.cpp
[SRC] Compiling autoreplace_cmd.cpp
[SRC] Compiling autoreplace_gui.cpp
[SRC] Compiling base_consist.cpp
[SRC] Compiling blitter/32bpp_anim.cpp
[SRC] Compiling blitter/32bpp_anim_sse4.cpp
[SRC] Compiling blitter/32bpp_base.cpp
[SRC] Compiling blitter/32bpp_optimized.cpp
[SRC] Compiling blitter/32bpp_simple.cpp
[SRC] Compiling blitter/32bpp_sse2.cpp
[SRC] Compiling blitter/32bpp_sse4.cpp
[SRC] Compiling blitter/32bpp_ssse3.cpp
[SRC] Compiling blitter/8bpp_base.cpp
[SRC] Compiling blitter/8bpp_optimized.cpp
[SRC] Compiling blitter/8bpp_simple.cpp
[SRC] Compiling blitter/base.cpp
[SRC] Compiling blitter/null.cpp
[SRC] Compiling bmp.cpp
[SRC] Compiling bootstrap_gui.cpp
[SRC] Compiling bridge_gui.cpp
[SRC] Compiling bridge_map.cpp
[SRC] Compiling build_vehicle_gui.cpp
[SRC] Compiling cargoaction.cpp
[SRC] Compiling cargomonitor.cpp
[SRC] Compiling cargopacket.cpp
[SRC] Compiling cargotype.cpp
[SRC] Compiling cheat.cpp
[SRC] Compiling cheat_gui.cpp
[SRC] Compiling clear_cmd.cpp
[SRC] Compiling command.cpp
[SRC] Compiling company_cmd.cpp
[SRC] Compiling company_gui.cpp
[SRC] Compiling console.cpp
[SRC] Compiling console_cmds.cpp
[SRC] Compiling console_gui.cpp
[SRC] Compiling core/alloc_func.cpp
[SRC] Compiling core/bitmath_func.cpp
[SRC] Compiling core/geometry_func.cpp
[SRC] Compiling core/math_func.cpp
[SRC] Compiling core/pool_func.cpp
[SRC] Compiling core/random_func.cpp
[SRC] Compiling cpu.cpp
[SRC] Compiling crashlog.cpp
[SRC] Compiling currency.cpp
[SRC] Compiling date.cpp
[SRC] Compiling date_gui.cpp
[SRC] Compiling debug.cpp
[SRC] Compiling dedicated.cpp
[SRC] Compiling depot.cpp
[SRC] Compiling depot_cmd.cpp
[SRC] Compiling depot_gui.cpp
[SRC] Compiling disaster_vehicle.cpp
[SRC] Compiling dock_gui.cpp
[SRC] Compiling driver.cpp
[SRC] Compiling economy.cpp
[SRC] Compiling effectvehicle.cpp
[SRC] Compiling elrail.cpp
[SRC] Compiling engine.cpp
[SRC] Compiling engine_gui.cpp
[SRC] Compiling error_gui.cpp
[SRC] Compiling fileio.cpp
[SRC] Compiling fios.cpp
[SRC] Compiling fios_gui.cpp
[SRC] Compiling fontcache.cpp
[SRC] Compiling fontdetection.cpp
[SRC] Compiling game/game_config.cpp
[SRC] Compiling game/game_core.cpp
[SRC] Compiling game/game_info.cpp
[SRC] Compiling game/game_instance.cpp
[SRC] Compiling game/game_scanner.cpp
[SRC] Compiling game/game_text.cpp
[SRC] Compiling gamelog.cpp
[SRC] Compiling genworld.cpp
[SRC] Compiling genworld_gui.cpp
[SRC] Compiling gfx.cpp
[SRC] Compiling gfx_layout.cpp
[SRC] Compiling gfxinit.cpp
[SRC] Compiling goal.cpp
[SRC] Compiling goal_gui.cpp
[SRC] Compiling graph_gui.cpp
[SRC] Compiling ground_vehicle.cpp
[SRC] Compiling group_cmd.cpp
[SRC] Compiling group_gui.cpp
[SRC] Compiling heightmap.cpp
[SRC] Compiling highscore.cpp
[SRC] Compiling highscore_gui.cpp
[SRC] Compiling hotkeys.cpp
[SRC] Compiling industry_cmd.cpp
[SRC] Compiling industry_gui.cpp
[SRC] Compiling ini.cpp
[SRC] Compiling ini_load.cpp
[SRC] Compiling intro_gui.cpp
[SRC] Compiling landscape.cpp
[SRC] Compiling linkgraph/demands.cpp
[SRC] Compiling linkgraph/flowmapper.cpp
[SRC] Compiling linkgraph/linkgraph.cpp
[SRC] Compiling linkgraph/linkgraph_gui.cpp
[SRC] Compiling linkgraph/linkgraphjob.cpp
[SRC] Compiling linkgraph/linkgraphschedule.cpp
[SRC] Compiling linkgraph/mcf.cpp
[SRC] Compiling linkgraph/refresh.cpp
[SRC] Compiling main_gui.cpp
[SRC] Compiling map.cpp
[SRC] Compiling misc.cpp
[SRC] Compiling misc/countedobj.cpp
[SRC] Compiling misc/dbg_helpers.cpp
[SRC] Compiling misc/getoptdata.cpp
[SRC] Compiling misc_cmd.cpp
[SRC] Compiling misc_gui.cpp
[SRC] Compiling mixer.cpp
[SRC] Compiling music.cpp
[SRC] Compiling music/null_m.cpp
[SRC] Compiling music/win32_m.cpp
[SRC] Compiling music_gui.cpp
[SRC] Compiling network/core/address.cpp
[SRC] Compiling network/core/core.cpp
[SRC] Compiling network/core/host.cpp
[SRC] Compiling network/core/packet.cpp
[SRC] Compiling network/core/tcp.cpp
[SRC] Compiling network/core/tcp_admin.cpp
[SRC] Compiling network/core/tcp_connect.cpp
[SRC] Compiling network/core/tcp_content.cpp
[SRC] Compiling network/core/tcp_game.cpp
[SRC] Compiling network/core/tcp_http.cpp
[SRC] Compiling network/core/udp.cpp
[SRC] Compiling network/network.cpp
[SRC] Compiling network/network_admin.cpp
[SRC] Compiling network/network_chat_gui.cpp
[SRC] Compiling network/network_client.cpp
[SRC] Compiling network/network_command.cpp
[SRC] Compiling network/network_content.cpp
[SRC] Compiling network/network_content_gui.cpp
[SRC] Compiling network/network_gamelist.cpp
[SRC] Compiling network/network_gui.cpp
[SRC] Compiling network/network_server.cpp
[SRC] Compiling network/network_udp.cpp
[SRC] Compiling newgrf.cpp
[SRC] Compiling newgrf_airport.cpp
[SRC] Compiling newgrf_airporttiles.cpp
[SRC] Compiling newgrf_canal.cpp
[SRC] Compiling newgrf_cargo.cpp
[SRC] Compiling newgrf_commons.cpp
[SRC] Compiling newgrf_config.cpp
[SRC] Compiling newgrf_debug_gui.cpp
[SRC] Compiling newgrf_engine.cpp
[SRC] Compiling newgrf_generic.cpp
[SRC] Compiling newgrf_gui.cpp
[SRC] Compiling newgrf_house.cpp
[SRC] Compiling newgrf_industries.cpp
[SRC] Compiling newgrf_industrytiles.cpp
[SRC] Compiling newgrf_object.cpp
[SRC] Compiling newgrf_railtype.cpp
[SRC] Compiling newgrf_sound.cpp
[SRC] Compiling newgrf_spritegroup.cpp
[SRC] Compiling newgrf_station.cpp
[SRC] Compiling newgrf_storage.cpp
[SRC] Compiling newgrf_text.cpp
[SRC] Compiling newgrf_town.cpp
[SRC] Compiling newgrf_townname.cpp
[SRC] Compiling news_gui.cpp
[SRC] Compiling object_cmd.cpp
[SRC] Compiling object_gui.cpp
[SRC] Compiling openttd.cpp
[SRC] Compiling order_backup.cpp
[SRC] Compiling order_cmd.cpp
[SRC] Compiling order_gui.cpp
[SRC] Compiling os/windows/crashlog_win.cpp
[SRC] Compiling os/windows/win32.cpp
[SRC] Compiling osk_gui.cpp
[SRC] Compiling pathfinder/npf/aystar.cpp
[SRC] Compiling pathfinder/npf/npf.cpp
[SRC] Compiling pathfinder/npf/queue.cpp
[SRC] Compiling pathfinder/opf/opf_ship.cpp
[SRC] Compiling pathfinder/yapf/yapf_rail.cpp
[SRC] Compiling pathfinder/yapf/yapf_road.cpp
[SRC] Compiling pathfinder/yapf/yapf_ship.cpp
[SRC] Compiling pbs.cpp
[SRC] Compiling progress.cpp
[SRC] Compiling rail.cpp
[SRC] Compiling rail_cmd.cpp
[SRC] Compiling rail_gui.cpp
[SRC] Compiling rev.cpp
[SRC] Compiling road.cpp
[SRC] Compiling road_cmd.cpp
[SRC] Compiling road_gui.cpp
[SRC] Compiling road_map.cpp
[SRC] Compiling roadstop.cpp
[SRC] Compiling roadveh_cmd.cpp
[SRC] Compiling roadveh_gui.cpp
[SRC] Compiling saveload/afterload.cpp
[SRC] Compiling saveload/ai_sl.cpp
[SRC] Compiling saveload/airport_sl.cpp
[SRC] Compiling saveload/animated_tile_sl.cpp
[SRC] Compiling saveload/autoreplace_sl.cpp
[SRC] Compiling saveload/cargomonitor_sl.cpp
[SRC] Compiling saveload/cargopacket_sl.cpp
[SRC] Compiling saveload/cheat_sl.cpp
[SRC] Compiling saveload/company_sl.cpp
[SRC] Compiling saveload/depot_sl.cpp
[SRC] Compiling saveload/economy_sl.cpp
[SRC] Compiling saveload/engine_sl.cpp
[SRC] Compiling saveload/game_sl.cpp
[SRC] Compiling saveload/gamelog_sl.cpp
[SRC] Compiling saveload/goal_sl.cpp
[SRC] Compiling saveload/group_sl.cpp
[SRC] Compiling saveload/industry_sl.cpp
[SRC] Compiling saveload/labelmaps_sl.cpp
[SRC] Compiling saveload/linkgraph_sl.cpp
[SRC] Compiling saveload/map_sl.cpp
[SRC] Compiling saveload/misc_sl.cpp
[SRC] Compiling saveload/newgrf_sl.cpp
[SRC] Compiling saveload/object_sl.cpp
[SRC] Compiling saveload/oldloader.cpp
[SRC] Compiling saveload/oldloader_sl.cpp
[SRC] Compiling saveload/order_sl.cpp
[SRC] Compiling saveload/saveload.cpp
[SRC] Compiling saveload/signs_sl.cpp
[SRC] Compiling saveload/station_sl.cpp
[SRC] Compiling saveload/storage_sl.cpp
[SRC] Compiling saveload/story_sl.cpp
[SRC] Compiling saveload/strings_sl.cpp
[SRC] Compiling saveload/subsidy_sl.cpp
[SRC] Compiling saveload/town_sl.cpp
[SRC] Compiling saveload/vehicle_sl.cpp
[SRC] Compiling saveload/waypoint_sl.cpp
[SRC] Compiling screenshot.cpp
[SRC] Compiling script/api/script_accounting.cpp
[SRC] Compiling script/api/script_admin.cpp
[SRC] Compiling script/api/script_airport.cpp
[SRC] Compiling script/api/script_base.cpp
[SRC] Compiling script/api/script_basestation.cpp
[SRC] Compiling script/api/script_bridge.cpp
[SRC] Compiling script/api/script_bridgelist.cpp
[SRC] Compiling script/api/script_cargo.cpp
[SRC] Compiling script/api/script_cargolist.cpp
[SRC] Compiling script/api/script_cargomonitor.cpp
[SRC] Compiling script/api/script_company.cpp
[SRC] Compiling script/api/script_companymode.cpp
[SRC] Compiling script/api/script_controller.cpp
[SRC] Compiling script/api/script_date.cpp
[SRC] Compiling script/api/script_depotlist.cpp
[SRC] Compiling script/api/script_engine.cpp
[SRC] Compiling script/api/script_enginelist.cpp
[SRC] Compiling script/api/script_error.cpp
[SRC] Compiling script/api/script_event.cpp
[SRC] Compiling script/api/script_event_types.cpp
[SRC] Compiling script/api/script_execmode.cpp
[SRC] Compiling script/api/script_game.cpp
[SRC] Compiling script/api/script_gamesettings.cpp
[SRC] Compiling script/api/script_goal.cpp
[SRC] Compiling script/api/script_group.cpp
[SRC] Compiling script/api/script_grouplist.cpp
[SRC] Compiling script/api/script_industry.cpp
[SRC] Compiling script/api/script_industrylist.cpp
[SRC] Compiling script/api/script_industrytype.cpp
[SRC] Compiling script/api/script_industrytypelist.cpp
[SRC] Compiling script/api/script_infrastructure.cpp
[SRC] Compiling script/api/script_list.cpp
[SRC] Compiling script/api/script_log.cpp
[SRC] Compiling script/api/script_map.cpp
[SRC] Compiling script/api/script_marine.cpp
[SRC] Compiling script/api/script_news.cpp
[SRC] Compiling script/api/script_object.cpp
[SRC] Compiling script/api/script_order.cpp
[SRC] Compiling script/api/script_rail.cpp
[SRC] Compiling script/api/script_railtypelist.cpp
[SRC] Compiling script/api/script_road.cpp
[SRC] Compiling script/api/script_sign.cpp
[SRC] Compiling script/api/script_signlist.cpp
[SRC] Compiling script/api/script_station.cpp
[SRC] Compiling script/api/script_stationlist.cpp
[SRC] Compiling script/api/script_story_page.cpp
[SRC] Compiling script/api/script_storypageelementlist.cpp
[SRC] Compiling script/api/script_storypagelist.cpp
[SRC] Compiling script/api/script_subsidy.cpp
[SRC] Compiling script/api/script_subsidylist.cpp
[SRC] Compiling script/api/script_testmode.cpp
[SRC] Compiling script/api/script_text.cpp
[SRC] Compiling script/api/script_tile.cpp
[SRC] Compiling script/api/script_tilelist.cpp
[SRC] Compiling script/api/script_town.cpp
[SRC] Compiling script/api/script_townlist.cpp
[SRC] Compiling script/api/script_tunnel.cpp
[SRC] Compiling script/api/script_vehicle.cpp
[SRC] Compiling script/api/script_vehiclelist.cpp
[SRC] Compiling script/api/script_viewport.cpp
[SRC] Compiling script/api/script_waypoint.cpp
[SRC] Compiling script/api/script_waypointlist.cpp
[SRC] Compiling script/api/script_window.cpp
[SRC] Compiling script/script_config.cpp
[SRC] Compiling script/script_info.cpp
[SRC] Compiling script/script_info_dummy.cpp
[SRC] Compiling script/script_instance.cpp
[SRC] Compiling script/script_scanner.cpp
[SRC] Compiling script/squirrel.cpp
[SRC] Compiling script/squirrel_std.cpp
[SRC] Compiling settings.cpp
[SRC] Compiling settings_gui.cpp
[SRC] Compiling ship_cmd.cpp
[SRC] Compiling ship_gui.cpp
[SRC] Compiling signal.cpp
[SRC] Compiling signs.cpp
[SRC] Compiling signs_cmd.cpp
[SRC] Compiling signs_gui.cpp
[SRC] Compiling smallmap_gui.cpp
[SRC] Compiling sound.cpp
[SRC] Compiling sound/null_s.cpp
[SRC] Compiling sound/win32_s.cpp
[SRC] Compiling sprite.cpp
[SRC] Compiling spritecache.cpp
[SRC] Compiling spriteloader/grf.cpp
[SRC] Compiling station.cpp
[SRC] Compiling station_cmd.cpp
[SRC] Compiling station_gui.cpp
[SRC] Compiling statusbar_gui.cpp
[SRC] Compiling story.cpp
[SRC] Compiling story_gui.cpp
[SRC] Compiling strgen/strgen_base.cpp
[SRC] Compiling string.cpp
[SRC] Compiling stringfilter.cpp
[SRC] Compiling strings.cpp
[SRC] Compiling subsidy.cpp
[SRC] Compiling subsidy_gui.cpp
[SRC] Compiling terraform_cmd.cpp
[SRC] Compiling terraform_gui.cpp
[SRC] Compiling textbuf.cpp
[SRC] Compiling texteff.cpp
[SRC] Compiling textfile_gui.cpp
[SRC] Compiling tgp.cpp
[SRC] Compiling thread/thread_win32.cpp
[SRC] Compiling tile_map.cpp
[SRC] Compiling tilearea.cpp
[SRC] Compiling timetable_cmd.cpp
[SRC] Compiling timetable_gui.cpp
[SRC] Compiling toolbar_gui.cpp
[SRC] Compiling town_cmd.cpp
[SRC] Compiling town_gui.cpp
[SRC] Compiling townname.cpp
[SRC] Compiling train_cmd.cpp
[SRC] Compiling train_gui.cpp
[SRC] Compiling transparency_gui.cpp
[SRC] Compiling tree_cmd.cpp
[SRC] Compiling tree_gui.cpp
[SRC] Compiling tunnel_map.cpp
[SRC] Compiling tunnelbridge_cmd.cpp
[SRC] Compiling vehicle.cpp
[SRC] Compiling vehicle_cmd.cpp
[SRC] Compiling vehicle_gui.cpp
[SRC] Compiling vehiclelist.cpp
[SRC] Compiling video/dedicated_v.cpp
[SRC] Compiling video/null_v.cpp
[SRC] Compiling video/win32_v.cpp
[SRC] Compiling viewport.cpp
[SRC] Compiling viewport_gui.cpp
[SRC] Compiling viewport_sprite_sorter_sse4.cpp
[SRC] Compiling void_cmd.cpp
[SRC] Compiling water_cmd.cpp
[SRC] Compiling waypoint.cpp
[SRC] Compiling waypoint_cmd.cpp
[SRC] Compiling waypoint_gui.cpp
[SRC] Compiling widget.cpp
[SRC] Compiling widgets/dropdown.cpp
[SRC] Compiling window.cpp
[SRC] Compiling resource os/windows/ottdres.rc
[SRC] Linking openttd.exe
make[1]: Leaving directory `/openttd-1.7.1/objs/release'
adf88 wrote:Have you tried compiling natively first?
Yes, compiling it as a Dedicated Server does work and launch.
adf88 wrote:Have you tried running in WINE?
No, i'm using a dedicated server with SSH, I don't have a interface/desktop.
adf88 wrote:How does "simply not launch" look like exactly? Can you upload the binary?
I dubble click the .exe and nothing happens. I can see openttd.exe shortly in the taske manager but it disapears after some time. I've included the .exe
Attachments
openttd.zip
OpenTTD which doesn't work
(3.08 MiB) Downloaded 160 times
User avatar
adf88
Chief Executive
Chief Executive
Posts: 644
Joined: 14 Jan 2008 15:51
Location: PL

Re: Cross Compiling with MXE. Linux -> Windows

Post by adf88 »

OK, I'm able to reproduce the bug, hurray! Now it should be like a walk through a park :p I'll let you know if I find something.

BTW, if you are finding anything troubling in the tutorial, don't bother leaving a note on the discussion page or here.
:] don't worry, be happy and checkout my patches
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Quinch and 19 guests