更新时间:2023-11-16 23:45:04
您已经构建了一个动态链接的可执行文件,它希望链接到libid3-3.8.so。 3在执行时。这在构建阶段可能与 -L / path / to / libid3 / directory -lid3
有关。
You have built a dynamically-linked executable, that wishes to be linked against libid3-3.8.so.3 at execution time. This was likely linked during the build phase with something like -L/path/to/libid3/directory -lid3
.
您有一些选项可使 libid3
可用,通常按优先顺序排列(因为您没有提及文件的位置,我只能是一般的):
You have a few options to make libid3
available, in generally decreasing order of preference (since you didn't mention where the file was, I can only be general):
libid3 *
在 /etc/ld.so.conf
(或 / lib
或 / usr / lib $ c>)
libid3 *
复制到 / etc /ld.so.conf
(或 / lib
或 / usr / lib
)默认值) libid3 *
的目录添加到 /etc/ld.so.conf
LD_LIBRARY_PATH = / directory / path /设置为/ libid3 *
id3v2
。 libid3*
in a directory listed in /etc/ld.so.conf
(or /lib
or /usr/lib
)libid3*
to a directory listed in /etc/ld.so.conf
(or /lib
or /usr/lib
) (defaults)libid3*
to /etc/ld.so.conf
LD_LIBRARY_PATH=/directory/path/to/libid3*
before running your id3v2 executable.id3v2
statically. (It will work, but don't bother.)在任何前3个之后,重新运行 ldconfig
,以便更新链接器缓存。 (您可以运行 ldconfig -v
以验证它是否可解析。)
After any of the first 3, rerun ldconfig
so the linker cache is updated. (You can then run ldconfig -v
to verify it's resolvable.)
注意这些不是步骤, '选项。你只需要做其中的1个。
Note those aren't steps, they're options. You only need to do 1 of them.
很高兴你更新了标题。 #include
指令与链接无关。
Glad you updated the title. #include
directives have nothing to do with linking.