VS 2015 compilation

Is anyone planning in the near future to make the VS2015 distribution compilable?

BTW Dydzio managed to get it compile with newer VS now.

Ran into a couple of problems when trying to compile with MSVC on a pretty early stage. First of all, the link for libraries pack download here wiki.vcmi.eu/index.php?title=How … I_(Windows only provides mingw libs despite the fact that the page is clearly related to Visual Studio.

Anyone here got an up to date lib bundle for MSVC? I could compile the libs myself ofc, but I’d rather prefer not to.

Download libraries separately. You need boost and zlib, additionally for VCMI_client you need sdl2 and ffmpeg. Boost, sdl2 and ffmpeg are easy to download from their websites. And you can get zlib using nuget package manager shipped with visual studio 2015: nuget.org/packages/zlib/

You also need qt for launcher but I do not play with launcher project.

Ye, I know - I know, my point is that the msvc bundle link is outdated and that the link that works, which is supposedly for msvc too, in fact only provides mingw libs

I got a compile error from missing QT modules in VCMI Launcher.

Error C1083 Cannot open include file: ‘QtWidgets’: No such file or directory VCMI_launcher c:\home\krs\work\vcmi\trunk\launcher\StdInc.h

I cannot find in my qt 5.7 distribution a file called QtWidgets.h. Could it be that I have not installed something?

It will be good, if someone provides step-by-step instruction how to compile VCMI under VS2015.
I tried to do this not long ago (and still want to try), but got some compile errors not solved by me yet.

I couldn’t compile recent build with VS 2013 at all, so moved to VC 2015. Now it works.

I can submit MSVS 2015 project files unless someone objects.

Please do :slight_smile:

Can you please share what Qt version are you using? Because for Qt 5.7 I have some missing includes

Anyone succeeded in compiling in VS2015? I followed the wiki, installed zlib, boost, ffmpeg, configured the lib path and include path, still have about 20 err (mostly missing include and LINK error)

I’s always like that, for everyone ;). Fix paths in projects manually.

what are your missing include and LINK errors?

See the screenshot below please. Not actually missing include but cannot open include file.

i.imgur.com/MJZbOTg.png

Not sure why zlib is still a problem for me because I’m sure that I installed zlib for every projects.

“No such file or directory” - can’t find include file. This is perfectly clear to me. The same goes for linker which can’t find .lib files.

If VCMI_Liblib is not created at all (compilation failed) or is created in wrong directory, you get this error.

Just navigate project settings (for each projectr, starting from VCMI_Lib) and make sure files are in specified include directories. Or, more precisely, make sure the directories are set where files are.

I have some free time now.

I’ve tried again to compile the whole thing I still get the same old error when compiling VCMI Launcher.

Error C1083 Cannot open include file: ‘QtWidgets’: No such file or directory VCMI_launcher c:\home\krs\work\vcmi\trunk\launcher\StdInc.h

I cannot find in my qt 5.7 distribution a file called QtWidgets.h. Could it be that I have not installed something?

Can someone help?

In my QT 5.1.1, QtWidgets is a folder.

Same for me in Qt 5.7. QtWidgets is a folder no .h

but at the same time in launcher/Stdinc.h there is this line …
#include

It does not look like anything to me.

I didn’t encounter this error. Not sure if this would help but I found QtWidgets in my boost folder.

Anyway, I was finally successfully solved those “cannot find…” errors. Now the only type of error I have left is the LINK error (there are like ~10 LINK errors). I looked it up and it seems like it has something to do with Linker -> Input under Properties. Any ideas to solve this?

@Warmonger Any idea why the file included from launcher/Stdinc.h " #include " is not present in Qt?

If you have also QTWidgets only as a folder, how come the include works for you?

I am really stuck here since a long time and I cannot come forward without some help :frowning: