Problems building on windows

I try to build on windows with vs2015 flowing the wiki guide.

CMake is new to me maybe I can get some quick advice.

I get an error about: Could NOT find MINIZIP (missing: MINIZIP_LIBRARY MINIZIP_INCLUDE_DIR). If I enter these by hand I go into tons of warnings from cotire, so maybe they are related?

i.imgur.com/1Plfk4z.png?1

toolchain.txt

SET(CMAKE_SYSTEM_NAME Windows)
SET(VCMIBUILD_DIR “c:/Home/Krs/Work/VCMI”)

SET(CMAKE_C_COMPILER cl)
SET(CMAKE_CXX_COMPILER cl)
set(CMAKE_RC_COMPILER rc)

SET(ENV{BOOST_ROOT} ${VCMIBUILD_DIR}/boost)
SET(ENV{BOOST_LIBRARYDIR} ${VCMIBUILD_DIR}/boost/lib32-msvc-14.0)

SET(CMAKE_FIND_ROOT_PATH ${VCMIBUILD_DIR}/depends)
list(APPEND CMAKE_PREFIX_PATH ${CMAKE_FIND_ROOT_PATH})
list(APPEND CMAKE_PREFIX_PATH ${VCMIBUILD_DIR}/Qt/5.5/msvc2013)

SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH)
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH)

EDIT:

In the end by manually giving the path to zlib includes and lib, it is configuring and generating with success, but with tons! of warnings (like in pic above).

Now building is not working. See below.

In the sources, many projects have absolute local paths. EG: for boost and qt libraries there are absolute paths in the global property sheets.

Now I have some problems building the sources

Whatever I do VS2015 cannot find me the boost libraries… Any ideas?

Ahh, so you’re on Visual now… here is how it works.

All boost libraries were copied to default include directory, as in the picture:

I also attach directory to VCMI-lib project. Note that vcmi (repo) directory is nested inside general VCMI folder.




Hmmm before I try what you suggest… I followed the wiki guide and I have now a different structure on my HDD then what you are suggesting. Is not everyone using the same?

VCMI
–qt
–boost
----boost
----lib32-msvc-14.0
–depends
----include
----lib
----bin
–source

  • from the lib package you provide on your site there is no minizip.dll

And as a side question, because I simply do not understand… In my picture above I have the path to boost in the and still the headers are not seen. (And it evaluates to the right path) any Ideas what could be wrong there?

Well you have path to boost library, but I show teh path to a folder one step above which contains boost folder.

Wiki guide might be wrong, I updated it once or twice, but didn’t test after. In general every time setup is difficult :wink:

Little offtop:

I tried to again set MSVS and github to current state of project some time ago. But i already forgot how it does, so didn’t succeded in beginning of work on VCMI :mrgreen:
There needs to be some kind of scripts + UI, that will allow complete beginner to run them and get all needed libraries and file structures and github account ready to code and commit.

Ivan works on VCMI under linux. Maybe image with linux, vcmi and KDE Designer can be prepared, so with only minimal steps made by instruction coder could get work started.

That are wishes for future :mrgreen:

My includes problem… I think it was VS2015. Tried in vain to make it see includes of this type: <boost/version.hpp>. Did a reinstall of the whole VS with no results. Installed VS2013 worked from the first go.

Another issue with boost: 1.58

The following is needed in globals.h.

#define BOOST_OPTIONAL_USE_OLD_DEFINITION_OF_NONE

Otherwise weird compile errors like:

error C3083: ' ?? A0x06d21c56': the symbol to the left of a '::' must be a type

Try Boost 1.55, because as far as I remember there were some issues with later releases.

I will keep boost 1.58 since its compiling for the moment. But I will keep in mind that there may be some problems, ty.

Now a question:
VCAI project needs includes from $(FUZZYLITEDIR) … where is this defined?

Define it yourself: rapidee.com/en/about

Now I ran into this compile error in CVideoHandler.cpp: av_alloc_frame() identifier not found

avutil version is 55

	// Allocate video frame
#if LIBAVUTIL_VERSION_MAJOR > 52
	frame = av_alloc_frame();
#else
	frame = avcodec_alloc_frame();
#endif

Caused by this pull:
github.com/vcmi/vcmi/pull/135

We’ll need to dig and check what LIBAVUTIL_VERSION_MAJOR libav/ffmpeg need in order to use it…