在 Debian 上编译 OpenBroadcaster

在 Debian 上编译 OpenBroadcaster

尝试在 debian 上编译 obs,如下所述:https://github.com/jp9000/obs-studio/blob/master/安装 给我这个错误:

Linking C shared library libobs.so
/usr/bin/ld: /usr/local/lib/../lib/libavcodec.a(avpacket.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/../lib/libavcodec.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
libobs/CMakeFiles/libobs.dir/build.make:1591: recipe for target 'libobs/libobs.so.0' failed
make[2]: *** [libobs/libobs.so.0] Error 1
CMakeFiles/Makefile2:333: recipe for target 'libobs/CMakeFiles/libobs.dir/all' failed
make[1]: *** [libobs/CMakeFiles/libobs.dir/all] Error 2
Makefile:137: recipe for target 'all' failed
make: *** [all] Error 2

我已经尝试编译它,-fPIC但这给了我这个错误:

make: PIC: File or Directory not found
make: *** No rule to make target 'PIC'. stop.

答案1

我只是按照这里的指南进行操作,然后它就起作用了:https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu

相关内容