gpt4 book ai didi

CMake;第386章 :x86-64 architecture of input file (. ) 与 i386 输出不兼容

转载 作者:行者123 更新时间:2023-12-02 11:44:12 24 4
gpt4 key购买 nike

第一次执行“cmake build”然后执行“make”时出现此错误:

/usr/bin/ld: i386:x86-64 architecture of input file `CMakeFiles/eperftool.dir/mp4reader.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `CMakeFiles/eperftool.dir/codec_instance_mgmt.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `CMakeFiles/eperftool.dir/callbacks.o' is incompatible with i386 output
(...)"

这是我的 make 文件的格式:

file (GLOB eperftool_sources ./*)

set(EPERFTOOL_BIN ${PROJECT_SOURCE_DIR}/bin/${CMAKE_BUILD_TYPE}/eperftool CACHE STRING "eperftool dir")
add_executable( eperftool ${eperftool_sources})


find_package (Threads)
if (Threads_FOUND)
include_directories(${Threads_INCLUDE_DIRS})
endif (Threads_FOUND)

target_link_libraries(eperftool openfec m)

target_link_libraries(eperftool ${CMAKE_THREAD_LIBS_INIT} )

set(CMAKE_SHARED_LINKER_FLAGS "-m32")"

在谷歌搜索问题并找到一个添加了链接器标志“-m32”的人以解决该问题后,我添加了最后一行“set(CMAKE_SHARED_LINKER_FLAGS“-m32”)”,但它没有解决对我来说是个问题。

我应该怎么做才能解决这个问题?

谢谢!

最佳答案

我认为,您从某处复制了对象文件mp4reader.o、codec_instance_mgmt.o 和callbacks.o(未在您的系统上编译),这导致您的系统不兼容。您可以尝试删除所有对象并重新编译:

rm *.o

然后再次编译。

关于CMake;第386章 :x86-64 architecture of input file (. ) 与 i386 输出不兼容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10044123/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com