【发布时间】:2020-03-04 04:24:09
【问题描述】:
我使用 Ubuntu 18.04.3 LTS (gcc 7.4.0) 我已经成功构建了 shaderc 以及 ktx library 所需的所有组件。当我构建 ktx 库(cmake/Iinux/debug 或发布)时,出现以下错误:
[ 91%] Linking CXX executable gl3loadtests
/usr/bin/ld:/home/user/Downloads/KTX-Software-master/build/cmake/linux/Release/../../../../other_lib/linux/Release-x64/libSDL2-2.0.so: file format not recognized; treating as linker script
/usr/bin/ld:/home/user/Downloads/KTX-Software-master/build/cmake/linux/Release/../../../../other_lib/linux/Release-x64/libSDL2-2.0.so:1: syntax error
collect2: error: ld returned 1 exit status
CMakeFiles/gl3loadtests.dir/build.make:205: recipe for target 'gl3loadtests' failed
make[2]: *** [gl3loadtests] Error 1
CMakeFiles/Makefile2:218: recipe for target 'CMakeFiles/gl3loadtests.dir/all' failed
make[1]: *** [CMakeFiles/gl3loadtests.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
符号链接看起来是这样的:
libSDL2-2.0.so -> libSDL2-2.0.so.0
libSDL2-2.0.so.0 -> libSDL2-2.0.so.0.9.0
libSDL2-2.0.so.0.9.0
有人在 linux 上遇到过同样的错误吗?如何解决?
【问题讨论】: