otland / forgottenserver

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

forgottenserver failed due to error LNK1181 on MSVC #4192

Closed nnfdnkns closed 5 months ago

nnfdnkns commented 2 years ago

Before creating an issue, please ensure:

Steps to reproduce (include any configuration/script required to reproduce)

1.git clone https://github.com/otland/forgottenserver F:\gitP\otland\forgottenserver 2.cd F:\gitP\Microsoft\vcpkg 3.bootstrap-vcpkg.bat 4.vcpkg.exe install --recurse boost-iostreams boost-asio boost-system boost-filesystem boost-variant boost-lockfree luajit libmariadb pugixml cryptopp fmt --triplet x64-windows --clean-after-build

  1. mkdir build_amd64 & cd F:\gitP\otland\forgottenserver\build_amd64
  2. set VSCMD_SKIP_SENDTELEMETRY=1 & "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat" -host_arch=amd64 -arch=amd64
  3. cd F:\gitP\otland\forgottenserver\build_amd64
  4. msbuild /m /p:Platform=x64 /p:Configuration=Release /p:PlatformToolset=v142 tfs.sln /t:Rebuild 2>&1

Expected behaviour

build successfully.

Actual behaviour

cannot open input file 'libmariadb.lib' [F:\gitP\otland\forgottenserver\build_amd64\tfs.vcxproj] so build failed

Environment

Windows: windows server 2019

Reproduction environment

VS: 2019

soul4soul commented 2 years ago

Did you install the libs with vcpkg? https://github.com/otland/forgottenserver/wiki/Compiling-on-Windows-%28vcpkg%29#4-install-libraries

nnfdnkns commented 2 years ago

Yes, please take a look at my re-updated steps to reproduce, Thanks!