openspades icon indicating copy to clipboard operation
openspades copied to clipboard

Linker Warnings/Errors on Windows

Open renebckr opened this issue 3 years ago • 5 comments

Description

After following the Guide in README.MD I tried compiling the generated solution. Initially, the Release configuration could not be linked properly. There were many errors concerning the default lib. Every other configuration also threw warnings for conflicts of default libs. It seems like some dependencies use different default libraries.

The Warning: https://docs.microsoft.com/en-us/cpp/error-messages/tool-errors/linker-tools-warning-lnk4098?view=msvc-170

There are ignored default libraries for the Release configuration that caused the linker failure. Only after removing both ignored libraries, the application would launch properly. Also, the ignored libraries (libcmt.lib; libcmtd.lib) would indicate Multithreaded DLL run time usage. This conflicts with the static libs downloaded via vcpk.

Now my question is: Is this just me? Does it work properly for everybody else?

Additional Information

Used CMake command for the generation of the solution: cmake -DVCPKG_TARGET_TRIPLET=x86-windows-static -G "Visual Studio 15 2017" --toolchain "G:/Projekte/openspades/vcpkg/scripts/buildsystems/vcpkg.cmake" -A Win32 -S "G:/Projekte/openspades" -B "G:/Projekte/openspades/OpenSpades.msvc"

Reproduction

  • Clone Repo
  • Follow Setup-Instructions for Windows
  • Open Solution using Visual Studio 2017
  • (Maybe required to switch to c++17 standard to compile as there are usages of "constexpr if")
  • Try compiling the release configuration

renebckr avatar Sep 06 '22 19:09 renebckr

For me I need libXext for some reason when it's a UNIX thing

PauliusV0 avatar Apr 10 '23 06:04 PauliusV0

I get the same issue

luis996 avatar Aug 23 '23 04:08 luis996

Bro this issue is a lot of old and it's still not fixed Bruhhh

luis996 avatar Aug 23 '23 04:08 luis996

Readme is outdated. Check GitHub Actions file, it should build successfully

nonperforming avatar Aug 23 '23 11:08 nonperforming

Readme is outdated. Check GitHub Actions file, it should build successfully

Interesting! It seems like it does a RelWithDebInfo build. Did anybody yet try to reproduce that workflow manually? It should be checked if that works for other build types as well. I would assume that we should be able to build Release/Debug-only builds as well.

renebckr avatar Aug 31 '23 17:08 renebckr