Compiling problems using MinGW

Ask for help with ScummVM problems

Moderator: ScummVM Team

Post Reply
User avatar
Vorph
Posts: 91
Joined: Sat Nov 19, 2005 4:58 pm
Location: Germany

Compiling problems using MinGW

Post by Vorph »

Hi there,

after having some issues compiling scummvm using VS2010 Express, I wanted to try minGW.

2 Problems occur:

when compiling scummvm 1.1.1, I get the following error:

Type with 2 bytes... couldn't find data type with 2 bytes

when compiling scummvm 1.3.0svn, after

Checking for whether -Wglobal-constructors work...

g++.exe crashes hard :cry:

Is there anything I am doing wrong ??

- OS is Windows 7 64Bit

- MinGW was installed using the automated installer, the version of gcc is 4.5.0

Vorph

Kirben
ScummVM Developer
Posts: 417
Joined: Wed Sep 21, 2005 12:15 pm
Location: Melbourne, Victoria, Australia

Post by Kirben »

Try using GCC version 4.2.1 under MinGW, which is used for Windows snapshots. The later GCC versions for MinGW are buggy, and not recommended.
Last edited by Kirben on Thu Oct 14, 2010 10:50 pm, edited 1 time in total.

KuroShiro
Posts: 455
Joined: Thu May 15, 2008 7:42 am
Location: Miyazaki, Japan

Re: Compiling problems using MinGW

Post by KuroShiro »

Vorph wrote:Hi there,

after having some issues compiling scummvm using VS2010 Express, I wanted to try minGW.

2 Problems occur:

when compiling scummvm 1.1.1, I get the following error:

Type with 2 bytes... couldn't find data type with 2 bytes

when compiling scummvm 1.3.0svn, after

Checking for whether -Wglobal-constructors work...

g++.exe crashes hard :cry:

Is there anything I am doing wrong ??

- OS is Windows 7 64Bit

- MinGW was installed using the automated installer, the version of gcc is 4.5.0

Vorph
The version of g++ that is installed by MinGW's automatic installer should work. Just check it as an option on install. You might also want to use the pre-compiled libraries for MinGW that you can find on the wiki -- there are some configuration files (SDL in particular) that can be a little weird by default.

User avatar
Vorph
Posts: 91
Joined: Sat Nov 19, 2005 4:58 pm
Location: Germany

Post by Vorph »

Hi,

maybe I am looking in the wrong place, but the automated installer as described in the WIKI doesn't seem to exist anymore. The current installer only gives me the option to Install mingw (and several compilers for different languages like fortran, c++, ada and some more), msys and msys dtk. The installer will then download the most recent version of the packages. On the Website (www.mingw.org) the "oldest" version of gcc / g++ I can find is 4.4.0...

After downgrading to this version (hope I did it right...) the same error occurs :(

Maybe the entry in the WIKI should be updated as well...

Vorph

EDIT: compiling the required libraries (sdl, libogg, etc.) seems to work fine.

mac_es
Posts: 121
Joined: Mon Oct 31, 2005 9:37 am

Post by mac_es »

The latest which works is 4.3.3

you can download from:

http://sourceforge.net/projects/tdm-gcc ... p/download

http://sourceforge.net/projects/tdm-gcc ... p/download

Download and unzip into mingw dir overwriting the files. Note that you changed from 4.5.0 DW2 to 4.3.3 SJLJ. Which means that maybe you have to recompile some libs. In case of scummvm it is only necesary to rebuild wxwidgets.

Also note, that you can compile FLAC 1.2.1 whith slight changes to the source code.

And for a "full" version you require also:
libpng, libtheora (sword 2.5 engine)
fluidsynth (1.0.9) (soundfonts support)
wxwidgets (for graphical tools)

User avatar
Vorph
Posts: 91
Joined: Sat Nov 19, 2005 4:58 pm
Location: Germany

Post by Vorph »

Thanks for the links, now it works

Vorph

MoKeiichi
Posts: 7
Joined: Sat Dec 05, 2009 11:38 am

Post by MoKeiichi »

Any news on this issue? g++ still crashes using gcc 4.5.2 (mingw) or an inofficial pre-release of 4.6.0, as stated above, everything starting from version 4.4.0... Is this really a bug in gcc/mingw?

User avatar
md5
ScummVM Developer
Posts: 2261
Joined: Thu Nov 03, 2005 9:31 pm
Location: Athens, Greece

Post by md5 »

If a later version of a compiler crashes with the same source, this is a problem with the compiler itself, not with ScummVM

MoKeiichi
Posts: 7
Joined: Sat Dec 05, 2009 11:38 am

Post by MoKeiichi »

Just found the following commit by lordhoto:
https://github.com/scummvm/scummvm/comm ... a2a0571ad6
Now building with newer mingw-gcc works fine :D

Post Reply