流浪喵喵 2025-12-27 00:29 采纳率: 75%
浏览 4

使用conan + clion +vs 2002 + qt 搭建环境的过程中一直报错libx265 error

使用conan + clion +vs 2002 + qt 搭建环境的过程中一直报错,libx265 error,求助大佬

conan install . --build=missing


CMake Deprecation Warning at CMakeLists.txt:2 (cmake_minimum_required):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.


-- cmake version 3.31.10
-- Using Conan toolchain: C:/Users/JunJie.Huang/.conan2/p/b/libx206c7f6bf229a2/b/build/generators/conan_toolchain.cmake
-- Conan toolchain: CMAKE_GENERATOR_TOOLSET=v143
-- Conan toolchain: Setting CMAKE_MSVC_RUNTIME_LIBRARY=$<$<CONFIG:Release>:MultiThreadedDLL>
-- Conan toolchain: C++ Standard 14 with extensions OFF
-- Conan toolchain: Setting BUILD_SHARED_LIBS = OFF
-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.26100.
-- The C compiler identification is MSVC 19.39.33520.0
-- The CXX compiler identification is MSVC 19.39.33520.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: D:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.39.33519/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: D:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.39.33519/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detected x86_64 target processor
-- Looking for include file stdint.h
-- Looking for include file stdint.h - found
-- Looking for include file inttypes.h
-- Looking for include file inttypes.h - found
CMake Warning (dev) at D:/Program Files/CMake/share/cmake-3.31/Modules/FindPackageHandleStandardArgs.cmake:441 (message):
  The package name passed to `find_package_handle_standard_args` (nasm) does
  not match the name of the calling package (Nasm).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  cmake/FindNasm.cmake:23 (find_package_handle_standard_args)
  CMakeLists.txt:359 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found nasm: C:/Users/JunJie.Huang/.conan2/p/nasma8c8d8be098a7/p/bin/nasm.exe (found version "2.15.05")
-- Found Nasm 2.15.05 to build assembly primitives
-- HG LIVE REPO STATUS CHECK DONE
-- X265 RELEASE VERSION unknown
-- The ASM_NASM compiler identification is NASM
-- Found assembler: C:/Users/JunJie.Huang/.conan2/p/nasma8c8d8be098a7/p/bin/nasm.exe
-- Looking for strtok_r
-- Looking for strtok_r - not found
CMake Error at CMakeLists.txt:684 (list):
  list GET given empty list


CMake Error at CMakeLists.txt:685 (list):
  list GET given empty list


-- Looking for include file getopt.h
-- Looking for include file getopt.h - not found
-- Configuring incomplete, errors occurred!

libx265/3.6: ERROR:
Package '51e0f530ce3b7ab1874d8a7d4d1db79c6980ad83' build failed
libx265/3.6: WARN: Build folder C:\Users\JunJie.Huang\.conan2\p\b\libx206c7f6bf229a2\b\build
ERROR: libx265/3.6: Error in build() method, line 142
        cmake.configure(build_script_folder=os.path.join(self.source_folder, "source"))
        ConanException: Error 1 while executing
PS C:\Users\JunJie.Huang\Desktop\project\Player>
  • 写回答

2条回答 默认 最新

  • 阿里嘎多学长 2025-12-27 00:29
    关注

    阿里嘎多学长整理AIGC生成,因移动端显示问题导致当前答案未能完全显示,请使用PC端查看更加详细的解答过程

    解决方案

    根据你的描述,问题出在使用Conan + CLion + VS 2002 + Qt 搭建环境时,出现了libx265错误。这里有几种可能的解决方案:

    1. 检查Conan配置:确保你的Conan配置文件(通常是conanfile.txt)正确配置了libx265的依赖。检查是否有相关的配置项,如[requires][generators]
    2. 更新Conan:尝试更新Conan到最新版本,可能会解决一些依赖问题。
    3. 重新安装libx265:尝试重新安装libx265,使用命令conan install . --build=missing,如果仍然报错,可以尝试使用--build=forced参数强制重新安装。
    4. 检查CMake配置:检查你的CMake配置文件(通常是CMakeLists.txt),确保正确配置了libx265的依赖。
    5. 检查CLion配置:检查你的CLion配置,确保正确配置了Conan和CMake的路径。

    核心代码

    # CMakeLists.txt
    find_package(Conan REQUIRED)
    conan_cmake_install(CONANFILE conanfile.txt)
    
    # conanfile.txt
    [requires]
    libx265/0.0.0
    
    [generators]
    cmake
    

    如果以上解决方案仍然无法解决问题,请提供更多详细信息和错误日志,我将继续帮助你解决问题。

    评论

报告相同问题?

问题事件

  • 创建了问题 12月27日