Skip to content

Error building cpp-tests on windows as a cmake project, #2594

@harontoo

Description

@harontoo
  • axmol version:axmol-2.7.1 dev branch

  • devices test on:Window 11

  • developing environments

    • Visual Studio:
      • VS version: 2022 (17.9+)
      • MSVC version: 19.39+
      • Windows SDK version: 10.0.22621.0+
    • cmake version:
      Steps to Reproduce:
  1. Open cpp-tests project folder using Visual Studio 2022 as a cmake project
  2. Configure using CMAKE -> succeeds
  3. Building the project produces the following Linker Errors

1********************************
Severity Code Description Project File Line Suppression State Details
Error LNK2001 unresolved external symbol __delayLoadHelper2 D:\engines\axmol\tests\cpp-tests\out\build\x64-Debug\cpp-tests D:\engines\axmol\tests\cpp-tests\out\build\x64-Debug\mf.lib(MF.dll) 1
Severity Code Description Project File Line Suppression State Details

2********************************
Error LNK2001 unresolved external symbol __delayLoadHelper2 D:\engines\axmol\tests\cpp-tests\out\build\x64-Debug\cpp-tests D:\engines\axmol\tests\cpp-tests\out\build\x64-Debug\Mfplat.lib(MFPlat.DLL) 1

3********************************
Severity Code Description Project File Line Suppression State Details
Error LNK1120 1 unresolved externals D:\engines\axmol\tests\cpp-tests\out\build\x64-Debug\cpp-tests D:\engines\axmol\tests\cpp-tests\out\build\x64-Debug\bin\cpp-tests\cpp-tests.exe 1

Screenshots of build output and error list below

Image Image

NOTE: This error does not occur when I generate project as a visual studio solution (.sln) and build it but only when built as a cmake project using CMakeLists.txt.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions