VS 2015 compilation


#1

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


#2

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


#3

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.


#4

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.


#5

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


#6

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?


#7

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.


#8

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.


#9

Please do :slight_smile:


#10

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


#11

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)


#12

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


#13

what are your missing include and LINK errors?


#14

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.


#15

“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.


#16

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?


#17

In my QT 5.1.1, QtWidgets is a folder.


#18

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.


#19

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?


#20

@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: