Latest Posts

Topic: Building SDL2 Issues on Windows 7

Gruz
Avatar
Topic Opener
Joined: 2017-12-07, 23:52
Posts: 1
Ranking
Just found this site
Posted at: 2017-12-08, 00:02

Hi, i'm on Windows 7

I want to try to try to try to contribute, so i followed the instructions on "building on windows" page

I'm on the building libraries step, and I try to run the : "./configure --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --prefix=/c/MinGW && make install" command

However, I got a lot of compilation errors, such as :

src/render/direct3d11/SDL_render_d3d11.c:135:19: error: static declaration of 'IID_IDXGIFactory2' follows non-static declaration

static const GUID IID_IDXGIFactory2 = { 0x50c83a1c, 0xe072, 0x4c48, { 0x87, 0xb0, 0x36, 0x30, 0xfa, 0x36, 0xa6, 0xd0 } };

               ^~~~~~~~~~~~~~~~~

In file included from e:\logiciels\mingw\x86_64-w64-mingw32\include\combaseapi.h:156:0,

             from e:\logiciels\mingw\x86_64-w64-mingw32\include\objbase.h:14,

             from e:\logiciels\mingw\x86_64-w64-mingw32\include\ole2.h:17,

             from e:\logiciels\mingw\x86_64-w64-mingw32\include\d3d11_1.h:12,

             from src/render/direct3d11/SDL_render_d3d11.c:33:

e:\logiciels\mingw\x86_64-w64-mingw32\include\dxgi1_2.h:764:1: note: previous declaration of 'IID_IDXGIFactory2' was here

DEFINE_GUID(IID_IDXGIFactory2, 0x50c83a1c, 0xe072, 0x4c48, 0x87,0xb0, 0x36,0x30,0xfa,0x36,0xa6,0xd0);

^

src/render/direct3d11/SDL_render_d3d11.c:136:19: error: static declaration of 'IID_IDXGIDevice1' follows non-static declaration

static const GUID IID_IDXGIDevice1 = { 0x77db970f, 0x6276, 0x48ba, { 0xba, 0x28, 0x07, 0x01, 0x43, 0xb4, 0x39, 0x2c } };

               ^~~~~~~~~~~~~~~~

In file included from e:\logiciels\mingw\x86_64-w64-mingw32\include\combaseapi.h:156:0,

             from e:\logiciels\mingw\x86_64-w64-mingw32\include\objbase.h:14,

             from e:\logiciels\mingw\x86_64-w64-mingw32\include\ole2.h:17,

             from e:\logiciels\mingw\x86_64-w64-mingw32\include\d3d11_1.h:12,

             from src/render/direct3d11/SDL_render_d3d11.c:33:

e:\logiciels\mingw\x86_64-w64-mingw32\include\dxgi.h:2506:1: note: previous declaration of 'IID_IDXGIDevice1' was here

DEFINE_GUID(IID_IDXGIDevice1, 0x77db970f, 0x6276, 0x48ba, 0xba,0x28, 0x07,0x01,0x43,0xb4,0x39,0x2c);

^

src/render/direct3d11/SDL_render_d3d11.c:137:19: error: static declaration of 'IID_ID3D11Texture2D' follows non-static declaration

static const GUID IID_ID3D11Texture2D = { 0x6f15aaf2, 0xd208, 0x4e89, { 0x9a, 0xb4, 0x48, 0x95, 0x35, 0xd3, 0x4f, 0x9c } };

               ^~~~~~~~~~~~~~~~~~~

In file included from e:\logiciels\mingw\x86_64-w64-mingw32\include\combaseapi.h:156:0,

             from e:\logiciels\mingw\x86_64-w64-mingw32\include\objbase.h:14,

             from e:\logiciels\mingw\x86_64-w64-mingw32\include\ole2.h:17,

             from e:\logiciels\mingw\x86_64-w64-mingw32\include\d3d11_1.h:12,

             from src/render/direct3d11/SDL_render_d3d11.c:33:

Is there anybody that encountered this kind of errors ? What can I do ?

Is there an order to process the configures on each directory ? I started with SDL2 image, then I realized it needs SDL 2.0.0 ... So I tried to configure SDL2-2.0.3

Tell me if you need more informations, but it seems that SDL is to fix.

Thank you face-wink.png


Top Quote
Tino

Joined: 2009-02-20, 17:05
Posts: 252
Ranking
Tribe Member
Location: Somewhere in Germany...
Posted at: 2017-12-08, 08:42

Are you following these instructions? https://wl.widelands.org/wiki/BuildingWidelandsUnderWindowsNew/ (but also a bit outdated...)

The instructions on https://wl.widelands.org/wiki/BuildingWidelandsUnderWindows/ are completely outdated....

I've just recently upgraded my own build environment with Nuwens latest distro, the additional and adapted scripts are here: https://github.com/TinoM/mingw-distro

But be aware: All scripts generate only static libraries, so if you later compile widelands, linking does not work without manual configuring...

For quicker results, i advise using http://www.msys2.org/ . With this distribution you can just install all needed packages with "pacman" and you have not to compile libraries yourself.


Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 15:56
Posts: 3324
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2017-12-08, 09:52

Tino, would you have tome time for cleaning up the wiki and remove anything that's outdated? I don't know anything your building with Windows, so I can't do that myself.

We currently have 2 pages, there should be only 1.

https://wl.widelands.org/wiki/BuildingWidelandsUnderWindowsNew/

https://wl.widelands.org/wiki/BuildingWidelandsWIN10/

Main page that it should be linked from: https://wl.widelands.org/wiki/Building%20Widelands/#building-under-windows

I fixed some links to point to the new page, hope that will help for people not to accidentally use the legacy version.

Edited: 2017-12-08, 10:03

Busy indexing nil values

Top Quote
Tino

Joined: 2009-02-20, 17:05
Posts: 252
Ranking
Tribe Member
Location: Somewhere in Germany...
Posted at: 2017-12-08, 13:17

Oh, i did not see that Hasi did already some experimenting with the new Linux Subsystem for windows...

I'll try to update and consolidate the articles during the holidays.


Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 15:56
Posts: 3324
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2017-12-08, 18:27

Thanks! face-smile.png


Busy indexing nil values

Top Quote
hessenfarmer
Avatar
Joined: 2014-12-11, 23:16
Posts: 2646
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2018-08-07, 10:54

I am trying for weeks now to set up a build environment on my win10 machine. I managed to get the compilation started on Msys64 using MinGw64 but some greedy nits still don't work. I tried to use the commands from the appveyor script and this was a good idea cause it got me running but perhaps something is still missing. Could anybody provide me with the full Appveyor config of MSYS? A readout of "pacman -Q" for example would be very helpful


Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 15:56
Posts: 3324
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2018-08-07, 15:02

You could try editing https://bazaar.launchpad.net/~widelands-dev/widelands/trunk/view/head:/appveyor.yml in a branch and adding the command to the build_script: section and then make a merge request?


Busy indexing nil values

Top Quote
hessenfarmer
Avatar
Joined: 2014-12-11, 23:16
Posts: 2646
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2018-08-12, 20:30

Ok I got msys64 to work now. In fact it isn't that hard to install I only needed to downgrade boost to 1.66 and now it works. If I find some time I will edit the wiki


Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 15:56
Posts: 3324
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2018-08-13, 10:04

A guide how to downgrade would be cool - CMake can't handle the latest boost version yet and I ran into the same problem.


Busy indexing nil values

Top Quote