<small id='0rCMq'></small><noframes id='0rCMq'>

    1. <legend id='0rCMq'><style id='0rCMq'><dir id='0rCMq'><q id='0rCMq'></q></dir></style></legend>

        <i id='0rCMq'><tr id='0rCMq'><dt id='0rCMq'><q id='0rCMq'><span id='0rCMq'><b id='0rCMq'><form id='0rCMq'><ins id='0rCMq'></ins><ul id='0rCMq'></ul><sub id='0rCMq'></sub></form><legend id='0rCMq'></legend><bdo id='0rCMq'><pre id='0rCMq'><center id='0rCMq'></center></pre></bdo></b><th id='0rCMq'></th></span></q></dt></tr></i><div id='0rCMq'><tfoot id='0rCMq'></tfoot><dl id='0rCMq'><fieldset id='0rCMq'></fieldset></dl></div>
        <tfoot id='0rCMq'></tfoot>

        • <bdo id='0rCMq'></bdo><ul id='0rCMq'></ul>

        如何使用 -fPIC 重新编译

        时间:2023-09-19

        1. <legend id='dErjp'><style id='dErjp'><dir id='dErjp'><q id='dErjp'></q></dir></style></legend>
              <tbody id='dErjp'></tbody>
            • <i id='dErjp'><tr id='dErjp'><dt id='dErjp'><q id='dErjp'><span id='dErjp'><b id='dErjp'><form id='dErjp'><ins id='dErjp'></ins><ul id='dErjp'></ul><sub id='dErjp'></sub></form><legend id='dErjp'></legend><bdo id='dErjp'><pre id='dErjp'><center id='dErjp'></center></pre></bdo></b><th id='dErjp'></th></span></q></dt></tr></i><div id='dErjp'><tfoot id='dErjp'></tfoot><dl id='dErjp'><fieldset id='dErjp'></fieldset></dl></div>
              1. <small id='dErjp'></small><noframes id='dErjp'>

                  <bdo id='dErjp'></bdo><ul id='dErjp'></ul>
                  <tfoot id='dErjp'></tfoot>

                  本文介绍了如何使用 -fPIC 重新编译的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我试图在我的 ARM Ubuntu 上按照这个指南重新安装我的 ffmpeg机器.不幸的是,当我编译一个使用这个库的程序时,我得到了以下失败:

                  I was trying to reinstall my ffmpeg, following this guide, on my ARM Ubuntu machine. Unfortunately, when I compile a program which uses this lib I get the following failure:

                  /usr/bin/ld: /usr/local/lib/libavcodec.a(amrnbdec.o): relocation R_ARM_MOVW_ABS_NC against `a local symbol' can not be used when making a shared object; recompile with -fPIC
                  /usr/local/lib/libavcodec.a: could not read symbols: Bad value
                  collect2: ld returned 1 exit status
                  

                  现在我想用 -fPIC 重新编译它,就像编译器建议的那样,但我不知道如何.任何帮助表示赞赏.

                  Now I would like to recompile it with -fPIC like the compiler is suggesting but I have no idea how. Any help is appreciated.

                  推荐答案

                  简而言之,该错误意味着您不能使用静态库与动态库链接.正确的做法是把一个libavcodec编译成一个.so而不是.a,这样另一个.so> 您尝试构建的库可以很好地链接.

                  Briefly, the error means that you can't use a static library to be linked w/ a dynamic one. The correct way is to have a libavcodec compiled into a .so instead of .a, so the other .so library you are trying to build will link well.

                  这样做的最短方法是在 ./configure 选项中添加 --enable-shared.或者您甚至可以尝试完全禁用共享(或静态)库……您选择适合您的库!

                  The shortest way to do so is to add --enable-shared at ./configure options. Or even you may try to disable shared (or static) libraries at all... you choose what is suitable for you!

                  这篇关于如何使用 -fPIC 重新编译的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:GCC STL 边界检查 下一篇:C++编译错误?

                  相关文章

                  最新文章

                  <legend id='UVpR9'><style id='UVpR9'><dir id='UVpR9'><q id='UVpR9'></q></dir></style></legend>
                  <i id='UVpR9'><tr id='UVpR9'><dt id='UVpR9'><q id='UVpR9'><span id='UVpR9'><b id='UVpR9'><form id='UVpR9'><ins id='UVpR9'></ins><ul id='UVpR9'></ul><sub id='UVpR9'></sub></form><legend id='UVpR9'></legend><bdo id='UVpR9'><pre id='UVpR9'><center id='UVpR9'></center></pre></bdo></b><th id='UVpR9'></th></span></q></dt></tr></i><div id='UVpR9'><tfoot id='UVpR9'></tfoot><dl id='UVpR9'><fieldset id='UVpR9'></fieldset></dl></div>
                • <small id='UVpR9'></small><noframes id='UVpR9'>

                  <tfoot id='UVpR9'></tfoot>
                  • <bdo id='UVpR9'></bdo><ul id='UVpR9'></ul>