zzz

绝区零

@zzz

  • 适用于 .NET Framework MSBuild 版本 17.11.9+a69bbaaf5
    
      fmt.vcxproj -> F:\Codes\cpp\dandelion-main\build\deps\fmt\Release\fmt.lib
      glfw.vcxproj -> F:\Codes\cpp\dandelion-main\build\deps\glfw\src\Release\glfw3.lib
      zlibstatic.vcxproj -> F:\Codes\cpp\dandelion-main\build\deps\assimp\contrib\zlib\Release\zlibstatic.lib
      assimp.vcxproj -> F:\Codes\cpp\dandelion-main\build\deps\assimp\lib\Release\assimp-vc143-mt.lib
      object.cpp
    F:\Codes\cpp\dandelion-main\deps\Eigen\src\Core\Matrix.h(46,40): warning C5054: 运算符“&”: 已在不同类型的枚举之间弃用 [F:\Codes\cpp\dandelion-main\build\dandelion.vcxproj]
      (编译源文件“../src/scene/object.cpp”)
          F:\Codes\cpp\dandelion-main\deps\Eigen\src\Core\Matrix.h(46,40):
          模板实例化上下文 (最早的实例化上下文) 为
              F:\Codes\cpp\dandelion-main\deps\Eigen\src\SVD\BDCSVD.h(73,7):
              在编译类模板“Eigen::BDCSVD”时
              F:\Codes\cpp\dandelion-main\deps\Eigen\src\Core\util\ForwardDeclarations.h(119,80):
              查看对正在编译的 类 模板 实例化“Eigen::Array<Eigen::Index,1,-1,1,1,-1>”的引用
              F:\Codes\cpp\dandelion-main\deps\Eigen\src\Core\Array.h(46,12):
              查看对正在编译的 类 模板 实例化“Eigen::PlainObjectBase<Eigen::Array<Eigen::Index,1,-1,1,1,-1>>”的引用
              F:\Codes\cpp\dandelion-main\deps\Eigen\src\Core\util\XprHelper.h(482,73):
              查看对正在编译的 类 模板 实例化“Eigen::internal::traits<Derived>”的引用
              with
              [
                  Derived=Eigen::Array<Eigen::Index,1,-1,1,1,-1>
              ]
              F:\Codes\cpp\dandelion-main\deps\Eigen\src\Core\Array.h(17,78):
              查看对正在编译的 类 模板 实例化“Eigen::internal::traits<Eigen::Matrix<_Scalar,1,-1,1,1,-1>>”的引用
              with
              [
                  _Scalar=Eigen::Index
              ]
    
    F:\Codes\cpp\dandelion-main\src\scene\object.cpp(107,38): warning C4100: “all_objects”: 未引用的形参 [F:\Codes\cpp\dandelion-main\build\dandelion.vcxproj]
      dandelion.vcxproj -> F:\Codes\cpp\dandelion-main\build\Release\dandelion.exe
    

    这是本地端运行的结果过,最终是可以正常运行的

    Post #2
  • MSVC 的版本
    image|690x149
    首先输入下面指令
    cmake -S .. -B . -DCMAKE_BUILD_TYPE=Debug -G "Visual Studio 17 2022"
    得到下面结果,

    -- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.22631.
    -- The C compiler identification is MSVC 19.41.34120.0
    -- The CXX compiler identification is MSVC 19.41.34120.0
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Check for working C compiler: F:/Visual Studio 2022/VC/Tools/MSVC/14.41.34120/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: F:/Visual Studio 2022/VC/Tools/MSVC/14.41.34120/bin/Hostx64/x64/cl.exe - skipped
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    Current build type: Debug
    -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
    -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
    -- Looking for pthread_create in pthreads
    -- Looking for pthread_create in pthreads - not found
    -- Looking for pthread_create in pthread
    -- Looking for pthread_create in pthread - not found
    -- Found Threads: TRUE
    -- Using Win32 for window creation
    -- {fmt} version: 11.0.2
    -- Build type: Debug
    -- Shared libraries disabled
    -- compiling zlib from sources
    -- Looking for sys/types.h
    -- Looking for sys/types.h - found
    -- Looking for stdint.h
    -- Looking for stdint.h - found
    -- Looking for stddef.h
    -- Looking for stddef.h - found
    -- Check size of off64_t
    -- Check size of off64_t - failed
    -- Looking for fseeko
    -- Looking for fseeko - not found
    -- Looking for unistd.h
    -- Looking for unistd.h - not found
    -- Enabled importer formats: COLLADA OBJ FBX
    -- Disabled importer formats: AMF 3DS AC ASE ASSBIN B3D BVH DXF CSM HMP IRRMESH IQM IRR LWO LWS M3D MD2 MD3 MD5 MDC MDL NFF NDO OFF OGRE OPENGEX PLY MS3D COB BLEND IFC XGL Q3D Q3BSP RAW SIB SMD STL TERRAGEN 3D X X3D GLTF 3MF MMD
    -- Enabled exporter formats:
    -- Disabled exporter formats: OBJ OPENGEX PLY 3DS ASSBIN ASSXML M3D COLLADA FBX STL X X3D GLTF 3MF PBRT ASSJSON STEP
    -- Treating all warnings as errors (for assimp library only)
    -- Configuring done (27.6s)
    -- Generating done (0.1s)
    -- Build files have been written to: F:/tools/dandelion-main/build
    

    额外节选一些有问题的地方
    1

    -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
    -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
    -- Looking for pthread_create in pthreads
    -- Looking for pthread_create in pthreads - not found
    -- Looking for pthread_create in pthread
    -- Looking for pthread_create in pthread - not found
    

    2

    -- Check size of off64_t
    -- Check size of off64_t - failed
    -- Looking for fseeko
    -- Looking for fseeko - not found
    -- Looking for unistd.h
    -- Looking for unistd.h - not found
    

    虽然不知道这些文件是什么,但似乎不影响文件的构建
    之后进行编译
    输入指令

    cmake --build . --config Debug --target dandelion --parallel 8
    

    得到下面结果

    适用于 .NET Framework MSBuild 版本 17.11.9+a69bbaaf5                                                                                                                 
    
      1>Checking Build System
      Building Custom Rule F:/tools/dandelion-main/deps/assimp/contrib/zlib/CMakeLists.txt
      Building Custom Rule F:/tools/dandelion-main/deps/fmt/CMakeLists.txt
      Building Custom Rule F:/tools/dandelion-main/deps/glfw/src/CMakeLists.txt
      context.c
      adler32.c
      compress.c
      crc32.c
      deflate.c
      gzclose.c
      gzlib.c
      gzread.c
      gzwrite.c
      inflate.c
      infback.c
      inftrees.c
      inffast.c
      trees.c
      uncompr.c
      zutil.c
    cl : 命令行  error D8021: 无效的数值参数“/Wa,-mbig-obj” [F:\tools\dandelion-main\build\deps\fmt\fmt.vcxproj]
      init.c
      input.c
      zlibstatic.vcxproj -> F:\tools\dandelion-main\build\deps\assimp\contrib\zlib\Debug\zlibstaticd.lib
      monitor.c
      Building Custom Rule F:/tools/dandelion-main/deps/assimp/code/CMakeLists.txt
      vulkan.c
      window.c
    cl : 命令行  error D8021: 无效的数值参数“/Wa,-mbig-obj” [F:\tools\dandelion-main\build\deps\assimp\code\assimp.vcxproj]
      win32_init.c
      win32_joystick.c
      win32_monitor.c
      win32_time.c
      win32_thread.c
      win32_window.c
      wgl_context.c
      egl_context.c
      osmesa_context.c
      正在生成代码...
      glfw.vcxproj -> F:\tools\dandelion-main\build\deps\glfw\src\Debug\glfw3.lib
    

    有两处一样的报错

    cl : 命令行 error D8021: 无效的数值参数“/Wa,-mbig-obj”
    

    查找资料显示出错原因是 Visual Studio 的 cl.exe 编译器不支持 GCC/MinGW 常用的 -Wa,-mbig-obj 参数。这个参数通常用于处理大对象文件,特别是在某些库(如 fmtassimp)的编译中。但它是针对 GCC 和 MinGW 编译器的参数,而 cl.exe 作为 MSVC 的编译器,不认识这个参数。

    这该怎么处理

    Post #3
  • 直接对 optimizer 文件夹进行压缩即可
    image|690x104
    不用进入到文件夹内部再打包压缩

    Post #5
  • 就是因为有同学作业卡住了吗?

    Post #3
  • 所以我的作业也是这种情况吗?

    Post #2
  • undefined|690x97
    我在学校教务处官网中没有找到相关的信息,怎么查找相关文件?

    Post #5
  • 感谢,我该怎么知道 2 中学校的情况?
    我想知道是否会影响夏令营材料提交,四六级成绩一般在 8 月底出成绩

    Post #4