Forum index VCMI Project - Heroes 3: WoG recreated
Forum of the project aiming to recreate best turn-based strategy ever!

FAQFAQ  SearchSearch  MemberlistMemberlist  UsergroupsUsergroups  StatisticsStatistics
RegisterRegister  Log inLog in  AlbumAlbum  DownloadDownload

Previous topic :: Next topic
Errors building using VS 2015
Author Message

Joined: 15 Dec 2016
Posts: 3
Posted: 2016-12-15, 20:26   Errors building using VS 2015

I went ahead and followed instructions from using Microsoft Visual Studio 2015 Community even though it says to use "Microsoft Visual C++ 2013 Express for Desktop". If VS 2015 isn't supported, then I guess there's no more to be said.

If other people are able to build using VS 2015, then I think my directory structure isn't right. Here's my base vcmi folder:


Where bin, include, lib, and share are all from "vcmi_bundle.7z" file on the "how to build vcmi" link referenced above. Trunk is a fork of the vcmi github repo.

In addition, I installed boost 1.62 to the default location, C:\local\boost_1_62_0. As per the "put along with other libs" instructions (I wasn't able to figure out how to apply "global" configuration settings in VS 2015, and also tried "individually per project" with the same compilation errors), I copied the "boost" directory to vcmi/include and the *.lib (~340 files) from lib32-msvc-14.0 to vcmi/lib.

After doing this, I run "build solution" (loading the "VCMI_VS11.sln" file) and get 27 errors, mostly some variant of the two below

-"Cannot open include file: 'unistd.h/SDL_version.h/': No such file or directory"
-"Cannot open input file 'VCMI_lib.lib"

And, of course, no new vcmi binaries in the /vcmi/trunk directory. If you'd like, I can attach output and/or give more information. Thanks!

Joined: 15 Dec 2016
Posts: 3
Posted: 2016-12-29, 09:13   

Finally got it to build after doing these steps:

-I cleared up most errors by dumping all my sdl/ffmpeg/etc header files straight into /vcmi/include instead of a directory like /vcmi/include/SDL2.

-In addition, the bundle on the wiki does not work so I reinstalled all the libraries separately.

-I also had trouble getting zlib1.dll to work, so I had to download the older version of zlib (zlib 1.1.4) which yielded zlib.dll instead of zlib1.dll. In addition, there was a weird bug where I had to add "#define ZLIB_WINAPI" before '#include "zlib.h"' (see to certain files.

-I created a separate 'libs' folder in trunk (/vcmi/trunk) that has "zlib.lib" in it because the "minizip" project doesn't search the usual (/vcmi/libs) folder. Also just remembered, I had to rename "lib" to "libs" in /vcmi directory. Hope this helps someone!
VCMI programmer

Age: 28
Joined: 07 Jun 2008
Posts: 1537
Location: Warsaw, Poland
Posted: 2016-12-29, 09:17   

And yes, the Wiki bundle might be outdated. No one else maintains it and in fact I didn't update that page for ages.

I had to rename "lib" to "libs

"Lib" and 'libs" are two separate folders. One holds VCMI_LIB project, the other holds .dll files linked by VCMI.

Either way, I'm glad that you made it. ;-)
Think twice if you really need to send me private message. Use public forum for general questions.
DJ Warmonger blog
beegee wrote:
Warmonger, you are the best!
Display posts from previous:   
Reply to topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
Add this topic to your bookmarks
Printable version

Jump to:  

Powered by phpBB modified by Przemo © 2003 phpBB Group

Hosting provided by DigitalOcean
Page generated in 0.01 second. SQL queries: 13