Getting build errors while compiling wesnoth 1.14.15 (Visual Studio 2019)

Get help with compiling or installing the game, and discuss announcements of new official releases.

Moderator: Forum Moderators

Post Reply
amanmakesart
Posts: 2
Joined: March 15th, 2021, 3:19 pm

Getting build errors while compiling wesnoth 1.14.15 (Visual Studio 2019)

Post by amanmakesart »

Hi, I am new to Wesnoth and open source programming in general. I was trying to compile version 1.14.15 and 1.15.10 using the instructions here and here. I opted to use Visual Studio 2019 and vcpkg for this installation. I am getting the following build errors while trying to compile either-
Severity Code Description Project File Line Suppression State
Error C1083 Cannot open include file: 'SDL2/SDL_ttf.h': No such file or directory wesnoth D:\workdir\repos\wesnoth-1.15.10.tar\wesnoth-1.15.10\src\build_info.cpp 38
Error C1083 Cannot open include file: 'boost/ptr_container/ptr_vector.hpp': No such file or directory (compiling source file ..\..\src\countdown_clock.cpp) wesnoth D:\workdir\repos\wesnoth-1.15.10.tar\wesnoth-1.15.10\src\replay_recorder_base.hpp 16
Error C1083 Cannot open include file: 'SDL2/SDL_ttf.h': No such file or directory (compiling source file ..\..\src\display.cpp) wesnoth D:\workdir\repos\wesnoth-1.15.10.tar\wesnoth-1.15.10\src\font\font_id.hpp 24
Error C1083 Cannot open include file: 'SDL2/SDL_ttf.h': No such file or directory (compiling source file ..\..\src\game_launcher.cpp) wesnoth D:\workdir\repos\wesnoth-1.15.10.tar\wesnoth-1.15.10\src\font\font_id.hpp 24
Error C1083 Cannot open include file: 'boost/ptr_container/ptr_vector.hpp': No such file or directory (compiling source file ..\..\src\menu_events.cpp) wesnoth D:\workdir\repos\wesnoth-1.15.10.tar\wesnoth-1.15.10\src\replay_recorder_base.hpp 16
Error C1083 Cannot open include file: 'boost/ptr_container/ptr_vector.hpp': No such file or directory (compiling source file ..\..\src\playmp_controller.cpp) wesnoth D:\workdir\repos\wesnoth-1.15.10.tar\wesnoth-1.15.10\src\replay_recorder_base.hpp 16
Error C1083 Cannot open include file: 'boost/ptr_container/ptr_vector.hpp': No such file or directory (compiling source file ..\..\src\playsingle_controller.cpp) wesnoth D:\workdir\repos\wesnoth-1.15.10.tar\wesnoth-1.15.10\src\replay_recorder_base.hpp 16
Error C1083 Cannot open include file: 'boost/ptr_container/ptr_vector.hpp': No such file or directory (compiling source file ..\..\src\replay_recorder_base.cpp) wesnoth D:\workdir\repos\wesnoth-1.15.10.tar\wesnoth-1.15.10\src\replay_recorder_base.hpp 16
Error C1083 Cannot open include file: 'boost/ptr_container/ptr_vector.hpp': No such file or directory (compiling source file ..\..\src\quit_confirmation.cpp) wesnoth D:\workdir\repos\wesnoth-1.15.10.tar\wesnoth-1.15.10\src\replay_recorder_base.hpp 16
Error C1083 Cannot open include file: 'boost/ptr_container/ptr_vector.hpp': No such file or directory (compiling source file ..\..\src\play_controller.cpp) wesnoth D:\workdir\repos\wesnoth-1.15.10.tar\wesnoth-1.15.10\src\replay_recorder_base.hpp 16
Error C1083 Cannot open include file: 'boost/ptr_container/ptr_vector.hpp': No such file or directory (compiling source file ..\..\src\saved_game.cpp) wesnoth D:\workdir\repos\wesnoth-1.15.10.tar\wesnoth-1.15.10\src\replay_recorder_base.hpp 16
Error C1083 Cannot open include file: 'boost/ptr_container/ptr_vector.hpp': No such file or directory (compiling source file ..\..\src\savegame.cpp) wesnoth D:\workdir\repos\wesnoth-1.15.10.tar\wesnoth-1.15.10\src\replay_recorder_base.hpp 16
Error C1083 Cannot open include file: 'boost/ptr_container/ptr_vector.hpp': No such file or directory (compiling source file ..\..\src\replay.cpp) wesnoth D:\workdir\repos\wesnoth-1.15.10.tar\wesnoth-1.15.10\src\replay_recorder_base.hpp 16
Error C1083 Cannot open include file: 'boost/ptr_container/ptr_vector.hpp': No such file or directory (compiling source file ..\..\src\replay_controller.cpp) wesnoth D:\workdir\repos\wesnoth-1.15.10.tar\wesnoth-1.15.10\src\replay_recorder_base.hpp 16
Error C1083 Cannot open include file: 'SDL2/SDL_ttf.h': No such file or directory (compiling source file ..\..\src\show_dialog.cpp) wesnoth D:\workdir\repos\wesnoth-1.15.10.tar\wesnoth-1.15.10\src\font\font_id.hpp 24
Error C1083 Cannot open include file: 'boost/ptr_container/ptr_vector.hpp': No such file or directory (compiling source file ..\..\src\synced_commands.cpp) wesnoth D:\workdir\repos\wesnoth-1.15.10.tar\wesnoth-1.15.10\src\replay_recorder_base.hpp 16
Error C1083 Cannot open include file: 'boost/ptr_container/ptr_vector.hpp': No such file or directory (compiling source file ..\..\src\team.cpp) wesnoth D:\workdir\repos\wesnoth-1.15.10.tar\wesnoth-1.15.10\src\replay_recorder_base.hpp 16
Error C1083 Cannot open include file: 'SDL2/SDL_ttf.h': No such file or directory (compiling source file ..\..\src\video.cpp) wesnoth D:\workdir\repos\wesnoth-1.15.10.tar\wesnoth-1.15.10\src\font\font_id.hpp 24

Would really appreciate some guidance on how to proceed!
User avatar
Pentarctagon
Project Manager
Posts: 5526
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: Getting build errors while compiling wesnoth 1.14.15 (Visual Studio 2019)

Post by Pentarctagon »

I believe both can be resolved by cloning the latest source from the master branch on github rather than using the source tarball - those errors are from dependencies that have since been removed, which is why they aren't part of the current instructions.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
amanmakesart
Posts: 2
Joined: March 15th, 2021, 3:19 pm

Re: Getting build errors while compiling wesnoth 1.14.15 (Visual Studio 2019)

Post by amanmakesart »

Pentarctagon wrote: March 15th, 2021, 3:40 pm I believe both can be resolved by cloning the latest source from the master branch on github rather than using the source tarball - those errors are from dependencies that have since been removed, which is why they aren't part of the current instructions.
Thanks for reply. I still got "cannot open include file boost/ptr_container/" errors on cloning the latest master branch on one file "replay-recorder-base.hpp" but was able to compile the master branch after adding boost-ptr-container(64bit) and other missing package to vcpkg.
User avatar
Pentarctagon
Project Manager
Posts: 5526
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: Getting build errors while compiling wesnoth 1.14.15 (Visual Studio 2019)

Post by Pentarctagon »

Alright, it looks like what happened was somebody tried to remove the use of that dependency, but only updated the VS2019 instructions without also updating the CI that runs every commit. Otherwise the same errors would've been happening on the CI as well.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
Post Reply