Donation

Help us to pay our server!
(: Consider a donation :)



Social Media

  • Facebook
  • Google+

Latest Posts

Topic: Building SDL2 Issues on Windows 7

Gruz
Avatar
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: 233
Ranking
Widelands-Forum-Junkie
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: 2159
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
Top Quote
Tino
Joined: 2009-02-20, 17:05
Posts: 233
Ranking
Widelands-Forum-Junkie
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: 2159
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2017-12-08, 18:27

Thanks! face-smile.png


Top Quote