Topic: Building with Visual Studio
impactus Topic Opener |
Posted at: 2021-04-23, 16:50
Currently trying to get things going based on the very helpful guide in the wiki. https://www.widelands.org/wiki/Building%20Widelands%20in%20Visual%20Studio/ I can already try to build it, with 4422 Warnings. Knowing what happened the last time I opened an older project in VS2019, I expect this is due to VS2019 being overly critical. Most of it is stuff like "conversion from 'size_t' to 'uint8_t', possible loss of data". I also had two errors in sound_handler.cc. std::max was missing. So I put #include <algorithm> after windows.h in the _WIN32 ifdef. Fixed it. Where I'm currently hitting a wall is the linker error "cannot open input file 'ssp.lib'". I was not able to find out what ssp is. There doesn't seem to be a source related to "ssp" and I can not find what external dependency this might be through google. Please help. Update: I found the request for ssp in "WIFunctions.cmake", line 149. I removed it and was able to build widelands.exe. However, I wasn't able to run it, it just did nothing. Looking at a normal widelands installation, the exe needs to be next to the data folder, so i copied it from build\x64-Release-static to the repository's root folder. There, the exe opens a window for a very short time before quitting without any output. Although, after some more experiments, I think the window shows the cursor graphic before closing. Now, I wouldn't be surprised if my modifications broke it. But I'm not entirely certain I just didn't give it the right environment. There doesn't seem to be documentation about this part of the process. More feedback about the process so far: I did indeed run into dependency chain problems like described in the troubleshooting section. Although I don't think it was mpg123. The fix was "vcpkg install yasm-tool:x86-windows" all the same. Although I did not use the triplet argument since I figured this out myself before reading the troubleshooting section. Another tiny thing to note:
this is imprecise. You are supposed to do this with the debug variants too, but those files are called differently, they end with d. As a result, it is unclear if the d should be removed or kept with the new filenames. Edited: 2021-04-23, 19:51
Top Quote |
impactus Topic Opener |
Posted at: 2021-04-24, 12:00
Is this not the right forum for this or something? Confused by the low number of posts here, and how the "technical help" forum seems to be used, since it's not in the development section. Top Quote |
kaputtnik |
Posted at: 2021-04-24, 16:15
Well, this a forum, not a hotline Probably no one who can help you has already seen your post. Maybe you can send a PM to matthiakl who creates the wiki article? Or switch to another IDE, like QtCreator (requires the Qt library)? Fight simulator for Widelands: |
impactus Topic Opener |
Posted at: 2021-04-24, 18:37
Yeah I get it, I didn't mean it that way. Maybe a bit, thought people would be more eager to get more devs. It also doesn't help that I asked in advance what is prefered for development, knowing what a shitshow basic setup usually is. Anyway, thanks for your reply. I just saw how quick related responses in the wrong(?) forum are. I assume the title didn't help, I just thought it would be more helpful once I get it going. Anyway, thanks for the contact. But the thing is, at this point I'm basically looking for instructions how/where to run the executable. Maybe the data folder being there just isn't enough? Or maybe some experience what could be wrong if the game just opens to black with a cursor and closes without a word? Or where I could find an error log what went wrong? Top Quote |
tothxa |
Posted at: 2021-04-24, 19:34
Maybe there are just more (GNU/)Linux (*BSD?) users around... I guess it wouldn't be surprising for a free software / open source game. Top Quote |
kaputtnik |
Posted at: 2021-04-24, 19:38
I have moved this topic to the forum Technical Help. Related to the data folder: Have you tried the Edited: 2021-04-24, 19:38
Fight simulator for Widelands: |
Atanase |
Posted at: 2021-04-24, 19:40
If I can..... Do you use Linux? Why do you want to use Visual Studio? Do you want to develop some new routines? La connaissance ne vaut que si elle est partagée par le plus grand nombre. |
impactus Topic Opener |
Posted at: 2021-04-24, 21:00
I just did. It was interesting, because it took a bit longer and it opened fullscreen. Before it opened a window as seems to be my configuration for playing the binaries i got from your site 2 weeks ago.
Since no advice implied this was a linux project first, and given that it has to build for windows anyway, I decided to go with Visual Studio, as I have that going anyway. Really I was interested in getting things going as easy as possible, and the guide didn't seem too compicated. At least it was my choice after deciding for windows. I actually develop for linux as my day job, but I do that in a VM. I was afraid as a game it could lead to problems executing the build in a VM. Like, imagine the game just opens to a black screen and immediatly closes. Then what? Oh well. Also cheers, it's Saturday night after all. Top Quote |
hessenfarmer |
Posted at: 2021-04-24, 21:32
Hi impactus, Edit: And yes devs are very welcome. A second Visual Studio expert who could manage to build with this environment would be welcome as well. Edited: 2021-04-24, 21:33
Top Quote |
Atanase |
Posted at: 2021-04-25, 00:58
Sorry, just I didn't understand. La connaissance ne vaut que si elle est partagée par le plus grand nombre. |