VS 2015 compilation

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:

doc.qt.io/qt-5/qtwidgets-index.html

There ineed is a file “QTWidgets” inside my QTWidgets folder, but it has no extension. In particular it’s not .h file.

Ok I have the file aswell. I just thought its must be a .h or .hpp.

The next problem is that it works if I use an absolute path, but no matter what I put in Additional Include directories it does not find the file

this works:
#include “c:\Home\Krs\Work\VCMI\Qt\5.7\msvc2015\include\QtWidgets\QtWidgets”

this does not
#include (with #include “c:\Home\Krs\Work\VCMI\Qt\5.7\msvc2015\include\QtWidgets” in Include additional dirs for project VCMI_Launcher)

Well, it always can be tricky - but for me it just works :stuck_out_tongue: Make sure you don’t have any messed-up extra characters in this field.

I had exactly the same… nevertheless I redid the whole thing from scratch…

From a fresh repository I had to:

move VCMI…/libs/. into VCMI…/libs/x86/.
In VCMILauncher I had to go to .prj and replace all QT paths
In VCAI I had to create a new macro called FUZZYLITE with value …/FuzzyLite/FuzzyLite
ERM project is not compiling -> out of build configuration (I just dont care about it)

And finally it builds!!!

Thanks for the help.

Is Editor not supposed to be built? Why is it not marked for building in configuration?

minizip outputs to VCMI/lib through some magic :). OtputDir for the minizip project is set to VCMIout=solutionDir !?