Jump to content
TrinityCore

Issues with boost while generating in Cmake and building in Visual Studio?


Rhawk
 Share

Recommended Posts

Disclaimer: I am not a developer or programmer of any kind. I unfortunately have only very basic (self-taught) knowledge of programming and am thus asking for assistance on this forum after trying to the best of my capabilities to fix the problem myself first. I hope someone will be able to help.

Description:

Hello.

So I am trying to create a server using the TinityCore guide posted on here, and I've been having some issues. My first issue was when "Git Clone" did not show up as an option when right-clicking the "Trinity" folder, or any folder. Only "Git Bash Here" and Git GUI here". I however attempted to circumvent this by using bash and the "git clone" command which seemed to work fine. However it created a subfolder within the Trinity folder called "TrinityCore".

I then attempted the configuring step using Cmake, which seemingly worked fine, but produced a warning as follows, multiple times:

CMake Warning at C:/Program Files/CMake/share/cmake-3.18/Modules/FindBoost.cmake:1187 (message):
New Boost version may have incorrect or missing dependencies and imported
targets
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.18/Modules/FindBoost.cmake:1311 (_Boost_COMPONENT_DEPENDENCIES)
C:/Program Files/CMake/share/cmake-3.18/Modules/FindBoost.cmake:1919 (_Boost_MISSING_DEPENDENCIES)
dep/boost/CMakeLists.txt:47 (find_package)

I however continued with the Generating of the build and went on into Visual Studio 2019 to clean and build the solution. The cleaning went smoothly. On my first attempt to build, about 18 files succeeded and 8 failed. I then built the solution again, and this time 12 errors popped up as follows:

Severity Code Description Project File Line Suppression State
Error LNK1181 cannot open input file '..\shared\RelWithDebInfo\shared.lib' bnetserver C:\Build\src\server\bnetserver\LINK 1
Error LNK1104 cannot open file 'libboost_filesystem-vc142-mt-x64-1_74.lib' vmap4assembler C:\Build\src\tools\vmap4_assembler\LINK 1
Error LNK1104 cannot open file 'libboost_filesystem-vc142-mt-x64-1_74.lib' mmaps_generator C:\Build\src\tools\mmaps_generator\LINK 1
Error LNK1104 cannot open file 'libboost_filesystem-vc142-mt-x64-1_74.lib' vmap4extractor C:\Build\src\tools\vmap4_extractor\LINK 1
Error LNK1104 cannot open file 'libboost_filesystem-vc142-mt-x64-1_74.lib' mapextractor C:\Build\src\tools\map_extractor\LINK 1
Error C2079 'boost::asio::detail::io_object_impl<boost::asio::detail::resolver_service,Executor>::executor_' uses undefined class 'boost::asio::executor' shared C:\local\boost_1_74_0\boost\asio\detail\io_object_impl.hpp 168
Error C2679 binary '=': no operator found which takes a right-hand operand of type 'std::unique_ptr<boost::asio::ip::tcp::resolver,std::default_deleteboost::asio::ip::tcp::resolver>' (or there is no acceptable conversion) shared C:\Trinity\TrinityCore\src\server\shared\Realm\RealmList.cpp 56
Error C2664 'boost::optionalboost::asio::ip::tcp::endpoint Trinity::Net::Resolve(boost::asio::ip::tcp::resolver &,const boost::asio::ip::tcp &,const std::string &,const std::string &)': cannot convert argument 1 from '_Ty' to 'boost::asio::ip::tcp::resolver &' shared C:\Trinity\TrinityCore\src\server\shared\Realm\RealmList.cpp 154
Error C2664 'boost::optionalboost::asio::ip::tcp::endpoint Trinity::Net::Resolve(boost::asio::ip::tcp::resolver &,const boost::asio::ip::tcp &,const std::string &,const std::string &)': cannot convert argument 1 from '_Ty' to 'boost::asio::ip::tcp::resolver &' shared C:\Trinity\TrinityCore\src\server\shared\Realm\RealmList.cpp 161
Error C2664 'boost::optionalboost::asio::ip::tcp::endpoint Trinity::Net::Resolve(boost::asio::ip::tcp::resolver &,const boost::asio::ip::tcp &,const std::string &,const std::string &)': cannot convert argument 1 from '_Ty' to 'boost::asio::ip::tcp::resolver &' shared C:\Trinity\TrinityCore\src\server\shared\Realm\RealmList.cpp 168
Error C2300 'boost::heap::detail::marked_heap_node<RespawnInfo *>': class does not have a destructor called '~Node' (compiling source file C:\Trinity\TrinityCore\src\server\game\Maps\Map.cpp) game C:\local\boost_1_74_0\boost\heap\detail\heap_node.hpp 145
Error LNK1181 cannot open input file '..\game\RelWithDebInfo\game.lib' worldserver C:\Build\src\server\worldserver\LINK 1

Expected behaviour:

I am expecting for the configuring of the build to not produce warnings, and the build in Visual Studio 2019 to work smoothly.

Steps to reproduce the problem:

I followed the steps as mentioned within the guide, and have even attempted using earlier boost versions and changing the environment variables accordingly, but haven't had any results.

Branch(es):

3.3.5a

Operating system: Windows 10

If someone would be able to help with my issue, I would deeply appreciate it. Thank you!

Rhawkie

Link to comment
Share on other sites

UPDATE: I have fixed the LNK1104 issues by installing boost 1.74 with the 1.42 build tools. I am however still experiencing a range of other issues:


Error    C2664    'std::optional<boost::asio::ip::tcp::endpoint> Trinity::Net::Resolve(boost::asio::ip::tcp::resolver &,const boost::asio::ip::tcp &,const std::string &,const std::string &)': cannot convert argument 1 from '_Ty' to 'boost::asio::ip::tcp::resolver &'    shared    C:\Trinity\TrinityCore\src\server\shared\Realm\RealmList.cpp    144    
Error    C2079    'boost::asio::detail::io_object_impl<boost::asio::detail::resolver_service<InternetProtocol>,Executor>::executor_' uses undefined class 'boost::asio::executor'    shared    C:\local\boost_1_74_0\boost\asio\detail\io_object_impl.hpp    168    
Error    C2679    binary '=': no operator found which takes a right-hand operand of type 'std::unique_ptr<boost::asio::ip::tcp::resolver,std::default_delete<boost::asio::ip::tcp::resolver>>' (or there is no acceptable conversion)    shared    C:\Trinity\TrinityCore\src\server\shared\Realm\RealmList.cpp    46    
Error    C2664    'std::optional<boost::asio::ip::tcp::endpoint> Trinity::Net::Resolve(boost::asio::ip::tcp::resolver &,const boost::asio::ip::tcp &,const std::string &,const std::string &)': cannot convert argument 1 from '_Ty' to 'boost::asio::ip::tcp::resolver &'    shared    C:\Trinity\TrinityCore\src\server\shared\Realm\RealmList.cpp    151    
Error    C2664    'std::optional<boost::asio::ip::tcp::endpoint> Trinity::Net::Resolve(boost::asio::ip::tcp::resolver &,const boost::asio::ip::tcp &,const std::string &,const std::string &)': cannot convert argument 1 from '_Ty' to 'boost::asio::ip::tcp::resolver &'    shared    C:\Trinity\TrinityCore\src\server\shared\Realm\RealmList.cpp    158    
Error    LNK1181    cannot open input file '..\shared\RelWithDebInfo\shared.lib'    authserver    C:\Build\src\server\authserver\LINK    1    
Error    C2300    'boost::heap::detail::marked_heap_node<const ThreatReference *>': class does not have a destructor called '~Node' (compiling source file C:\Trinity\TrinityCore\src\server\game\Combat\ThreatManager.cpp)    game    C:\local\boost_1_74_0\boost\heap\detail\heap_node.hpp    145    
Error    C2300    'boost::heap::detail::marked_heap_node<RespawnInfo *>': class does not have a destructor called '~Node' (compiling source file C:\Trinity\TrinityCore\src\server\game\Maps\Map.cpp)    game    C:\local\boost_1_74_0\boost\heap\detail\heap_node.hpp    145    
Error    LNK1181    cannot open input file '..\game\RelWithDebInfo\game.lib'    worldserver    C:\Build\src\server\worldserver\LINK    1    
 

Please assist.

Link to comment
Share on other sites

1 minute ago, Aokromes said:

downgrade to 1.73.

Thank you for the reply. After redoing the entire process again, I realized that there were 3 problems (for future users struggling with the same errors):

1) I downloaded the wrong git programs. I only downloaded the normal Git GUI program and not Git Extensions. Please make sure you download Git Extensions as this is what gives you the "Git Clone" option when right-clicking your Trinity Folder.

2) The git clone command I used did not sufficiently download the necessary files needed to properly compile the program despite multiple attempts. Again, make sure you download the Git Extensions program to ensure you clone the repository properly.

3) Boost 1.74 does not properly work with the compiler. Download the 1.72 Boost and make sure it is the 1.42 subtype. The installation program is named boost_1_72_0-msvc-14.2-64.exe.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...