【发布时间】:2020-08-10 03:12:35
【问题描述】:
这是我的第一篇文章。
我需要为我的项目处理音频,所以我决定使用 libsnfile。
我已经安装了它,但是当我尝试使用 gcc somefile.c 或 gcc `pkg-config sndfile` somefile.c 编译任何 .c 程序时,它给了我“未定义”错误
/tmp/ccGTKZdy.o: En la función `convert_to_text':
sndfile-to-text.c:(.text+0x193): referencia a `sf_readf_float' sin definir
/tmp/ccGTKZdy.o: En la función `main':
sndfile-to-text.c:(.text+0x37a): referencia a `sf_open' sin definir
sndfile-to-text.c:(.text+0x3a7): referencia a `sf_strerror' sin definir
sndfile-to-text.c:(.text+0x3e1): referencia a `sf_strerror' sin definir
sndfile-to-text.c:(.text+0x45f): referencia a `sf_close' sin definir
未定义任何“sf_...”函数。 我读过我可能必须链接到图书馆,但我不知道如何。帮助。
【问题讨论】:
标签: c ld pkg-config libsndfile