Trying to compile wesnoth under Windows with scons+Mingw

Get help with compiling or installing the game, and discuss announcements of new official releases.

Moderator: Forum Moderators

Post Reply
User avatar
Nobun
Code Contributor
Posts: 129
Joined: May 4th, 2009, 9:28 pm
Location: Italy

Trying to compile wesnoth under Windows with scons+Mingw

Post by Nobun »

I have resolved wesnoth dependencies (except optionals like freebidi) but after the build process starts I have building errors.
I'm using the source of 1.8 from main main page (not the svn version), I changed it applying the 1.6 lobby patch made by silene (patch uploaded somewere here).

However I tried also with the original sources and I have the same problems I now explain

Mingw-g++ (g++ version: 3.4.5)
scons (lastest version)
Python(lastest version)

this is my building suite... now the errors

1st error: on src/threads.hpp line 159

it seems that values of enum (WAIT_OK, WAIT_TIMEOUT, WAIT_ERROR) for strange rasons create confusion in compiler (it says something like that it is expected } before macros).
I "solved" changing "WAIT_OK" with "nobunwaitok" and the other 2 values in a similar way. I made all change recursively in all files.

During compiling process I noted a lot of warnings

2nd error: on src/gui/auxiliary/event/dispatcher_private.hpp line 72

error: template <class k> static typename boost::enable_if [etc] cannot be overloaded

----

Also the 1st error was very strange but I found a (not nice way) to solve it. The 2nd error not seems to be solved so easily.
Did you have an idea why the "stable" source have those type of errors and why have SO MANY warnings (also in other modules builded without errors, but with warnings like for exemple "variable k might be used before initialization" o something similar)
?

Any suggestion?
Is it due to compiler or due to other reasons?

It is a very strange problem
ilor
Inactive Developer
Posts: 129
Joined: March 24th, 2008, 9:05 pm

Re: Trying to compile wesnoth under Windows with scons+Mingw

Post by ilor »

The first issue has been fixed in trunk, there seems to be a conflict with a header file with mingw and a new Boost and this WAIT_TIMEOUT symbol. Your fix is pretty much what I've done there a few days ago.

I'm not so sure about the second error, never seen it. However, you seem to be using a very old GCC, please try with something from the 4.x line.
User avatar
Nobun
Code Contributor
Posts: 129
Joined: May 4th, 2009, 9:28 pm
Location: Italy

Re: Trying to compile wesnoth under Windows with scons+Mingw

Post by Nobun »

Thank a lot, ilor... I will try with a 4.x version of g++ and I will see if it works. I will let you know if using a newest compiler solves the problem.
Post Reply