otland / forgottenserver

A free and open-source MMORPG server emulator written in C++
https://otland.net
GNU General Public License v2.0
1.57k stars 1.05k forks source link

Compiling error with VCPKG #4660

Closed jprzimba closed 3 months ago

jprzimba commented 4 months ago

Trying to compile latest rev with VCPKG following this tutorial https://github.com/otland/forgottenserver/wiki/Compiling-on-Windows-%28vcpkg%29

And when I go Visual Studio->Open Local Folder-> and open directory "forgottenserver" i get this error Yes I've installed Crypto+, since I using .\vcpkg install --triplet x64-windows boost-iostreams boost-asio boost-system boost-variant boost-lockfree boost-locale luajit libmariadb pugixml cryptopp fmt

Severity Code Description Project File Line Suppression State Details Error CMake Error at C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find Crypto++ (missing: Crypto++_INCLUDE_DIR Crypto++_LIBRARIES) C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake 230

Codinablack commented 4 months ago

This was due to Crypto Dropping CMake support. TFS dropped Crypto in favor of SSL. I would suggest downloading latest from the main branch and trying again, as this was changed only two days ago.

jprzimba commented 4 months ago

when I go Visual Studio->Open Local Folder-> and open directory "forgottenserver" i get this error following compiling tutorial and inslled packages again error changed to Severity Code Description Project File Line Suppression State Details Error CMake Error at C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY OPENSSL_INCLUDE_DIR Crypto) (Required is at least version "3.0.0") C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake 230

Maybe need to update this tutorial https://github.com/otland/forgottenserver/wiki/Compiling-on-Windows-%28vcpkg%29

EvilHero90 commented 4 months ago

Maybe need to update this tutorial https://github.com/otland/forgottenserver/wiki/Compiling-on-Windows-%28vcpkg%29

The Wiki page for vcpkg was already updated, I updated it with the PR that changed from cryptopp to openssl Open your cmd and navigate to your vcpkg directory, then run vcpkg install openssl:x64-windows that should install openssl

jprzimba commented 4 months ago
C:\vcpkg>vcpkg install openssl:x64-windows
Computing installation plan...
The following packages are already installed:
    openssl:x64-windows@3.3.0
openssl:x64-windows is already installed
Total install time: 155 us
openssl is compatible with built-in CMake targets:

  find_package(OpenSSL REQUIRED)
  target_link_libraries(main PRIVATE OpenSSL::SSL)
  target_link_libraries(main PRIVATE OpenSSL::Crypto)

but error still there

EvilHero90 commented 4 months ago

Maybe you have somewhere a duplicated vcpkg installation which is the one linked with vc thus throwing the error that it cannot be found, you should probably check that

MatthewCollard commented 3 months ago

Hi, I compiled the latest master fine, but does it support 10.98? Can't seem to get it to work with it, I changed the required version in the config, I just get stuck on an infinite loading screen.

EPuncker commented 3 months ago

Hi, I compiled the latest master fine, but does it support 10.98? Can't seem to get it to work with it, I changed the required version in the config, I just get stuck on an infinite loading screen.

no, master doesn't support 10.98, it is 13.10

and no, changing these lines alone is not enought to change protocol