axmolengine / axmol

Axmol Engine – A Multi-platform Engine for Desktop, XBOX (UWP) and Mobile games. (A fork of Cocos2d-x-4.0)
https://axmol.dev
MIT License
868 stars 195 forks source link

axmol new -p org.axmol.hellocpp.... => I still got this link error: LINK : fatal error LNK1104: cannot open file 'dep_zlib.lib' #1088

Closed aismann closed 1 year ago

aismann commented 1 year ago

`
C:\Users\eismpesd\GitHub\aismann\axmol>axmol new -p org.axmol.hellocpp -d C:\Users\eismpesd\GitHub\aismann\ -l cpp HelloCpp Requirement already satisfied: vswhere in c:\users\eismpesd\appdata\local\programs\python\python311\lib\site-packages (1.4.0)

Copy template into b'C:\Users\eismpesd\GitHub\aismann\HelloCpp'

C:\Users\eismpesd\GitHub\aismann\axmol>cd C:\Users\eismpesd\GitHub\aismann\HelloCpp

C:\Users\eismpesd\GitHub\aismann\HelloCpp>cmake -B build -A x64 "-DAX_PREBUILT_DIR=build" -- Building for: Visual Studio 17 2022 -- Selecting Windows SDK version 10.0.22000.0 to target Windows 10.0.19044. -- The C compiler identification is MSVC 19.34.31937.0 -- The CXX compiler identification is MSVC 19.34.31937.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Professional/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x64/cl.exe - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Professional/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x64/cl.exe - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Using system env var _AX_ROOT=C:\Users\eismpesd\GitHub\aismann\axmol -- PROJECT_NAME:HelloCpp -- PROJECT_SOURCE_DIR:C:/Users/eismpesd/GitHub/aismann/HelloCpp -- _AX_ROOT_PATH:C:/Users/eismpesd/GitHub/aismann/axmol -- CMAKE_MODULE_PATH:C:/Users/eismpesd/GitHub/aismann/axmol/cmake/Modules/ -- PROJECT_BINARY_DIR:C:/Users/eismpesd/GitHub/aismann/HelloCpp/build -- ENGINE_BINARY_PATH:C:/Users/eismpesd/GitHub/aismann/HelloCpp/build/engine -- PYTHON_PATH:C:/Users/eismpesd/AppData/Local/Programs/Python/Python311/python.exe -- _AX_COMMAND_PATH:C:/Users/eismpesd/GitHub/aismann/axmol/tools/console/bin/axmol -- HOST_SYSTEM:Windows -- CMAKE_GENERATOR: Visual Studio 17 2022 -- CMAKE_HOST_SYSTEM_VERSION: 10.0.19044 -- CMAKE_SYSTEM_VERSION: 10.0.19044 -- CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION: 10.0.22000.0 -- CMAKE_C_STANDARD=99 -- CMAKE_CXX_STANDARD=20 -- using Windows MSVC generate axmol project, MSVC_VERSION:1934 -- The ASM compiler identification is MSVC -- Found assembler: C:/Program Files/Microsoft Visual Studio/2022/Professional/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x64/cl.exe -- The ASM_NASM compiler identification is unknown -- Didn't find assembler -- The nasm compiler speed up libraries: jpeg(libjpeg-turbo) CMake Warning at C:/Users/eismpesd/GitHub/aismann/axmol/cmake/Modules/AXConfigDefine.cmake:215 (message): The nasm compiler doesn't present on your system PATH, please download from: https://www.nasm.us/pub/nasm/releasebuilds/2.15.05/ Call Stack (most recent call first): C:/Users/eismpesd/GitHub/aismann/axmol/cmake/Modules/AXBuildSet.cmake:43 (include) CMakeLists.txt:55 (include)

-- _AX_LUAJIT_ROOT:C:/Users/eismpesd/GitHub/aismann/axmol/tools/console/bin/../plugins/plugin_luacompile/bin -- LUAJIT32_COMMAND:LUAJIT32_COMMAND-NOTFOUND -- LUAJIT64_COMMAND:LUAJIT64_COMMAND-NOTFOUND -- AX_USE_COMPAT_GL=OFF -- AX_ENABLE_MSEDGE_WEBVIEW2=ON -- AX_ENABLE_MFMEDIA=ON -- AX_ENABLE_EXT_IMGUI=ON -- AX_ENABLE_EXT_FAIRYGUI=ON -- AX_ENABLE_EXT_LIVE2D=OFF -- AX_ENABLE_EXT_GUI=ON -- AX_ENABLE_EXT_ASSETMANAGER=ON -- AX_ENABLE_EXT_PARTICLE3D=ON -- AX_ENABLE_EXT_PHYSICS_NODE=ON -- AX_ENABLE_EXT_SPINE=ON -- AX_ENABLE_EXT_EFFEKSEER=OFF -- AX_ENABLE_EXT_LUA=ON -- Configuring done -- Generating done -- Build files have been written to: C:/Users/eismpesd/GitHub/aismann/HelloCpp/build

C:\Users\eismpesd\GitHub\aismann\HelloCpp>cmake --build build --config Debug --target HelloCpp MSBuild version 17.4.1+9a89d02ff for .NET Framework Checking Build System Syncing resources for HelloCpp ... Building Custom Rule C:/Users/eismpesd/GitHub/aismann/HelloCpp/CMakeLists.txt Syncing to C:/Users/eismpesd/GitHub/aismann/HelloCpp/build/bin/HelloCpp/Debug/Content Junction created for C:\Users\eismpesd\GitHub\aismann\HelloCpp\build\bin\HelloCpp\Debug\Content <<===>> C:\Users\eism pesd\GitHub\aismann\HelloCpp\Content [message] create symlink C:\Users\eismpesd\GitHub\aismann\HelloCpp\Content ===> C:\Users\eismpesd\GitHub\aismann\Hell oCpp\build\bin\HelloCpp\Debug\Content Building Custom Rule C:/Users/eismpesd/GitHub/aismann/HelloCpp/CMakeLists.txt AppDelegate.cpp HelloWorldScene.cpp main.cpp Generating Code... _LINK : fatal error LNK1104: cannot open file 'depzlib.lib' [C:\Users\eismpesd\GitHub\aismann\HelloCpp\build\HelloCpp.v cxproj]

C:\Users\eismpesd\GitHub\aismann\HelloCpp>`

halx99 commented 1 year ago

it's caused by internals been loaded from prebuilts dir by cmake load_cache, that's why I change load_cache parameter https://github.com/axmolengine/axmol/commit/d72d21de8169fe10e250552802afaa998015d42b to avoid load internals, instead, just load all options, i.e. AX_ENABLE_EXT_SPINE

so please ensure your cmake load_cache works correct and

then, try again, and you can open CMakeCache.txt to check, the new project CMakeCache.txt shouldn't include dep_zlib.lib

aismann commented 1 year ago

It works without : "-DAX_PREBUILT_DIR=build_x86"