- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我目前运行的是 Ubuntu 12.04。我正在寻找安装This Package .
我已经安装了软件包:'fftw2','fftw-dev','fftw-doc','fftw-3.3.4'
但是,当我尝试 root@ubuntu:~/spectrum-master# make
时:
cc -lm -lasound -L/usr/lib/x86_64-linux-gnu -lSDL -lfftw3f -lm spectrum.o mmap_file.o pcm.o wav.o alsa.o window.o stft.o cqt.o trans.o -o spectrum
spectrum.o: In function handle_events': /home/userKum/spectrum-master/spectrum.c:27: undefined reference toSDL_PollEvent'
spectrum.o: In function srgb': /home/userKum/spectrum-master/spectrum.c:78: undefined reference to__powf_finite'
/home/userKum/spectrum-master/spectrum.c:76: undefined reference to __powf_finite' /home/userKum/spectrum-master/spectrum.c:77: undefined reference to__powf_finite'
spectrum.o: In function main': /home/userKum/spectrum-master/spectrum.c:126: undefined reference toSDL_Init'
/home/userKum/spectrum-master/spectrum.c:127: undefined reference to SDL_SetVideoMode' /home/userKum/spectrum-master/spectrum.c:143: undefined reference toSDL_WM_SetCaption'
/home/userKum/spectrum-master/spectrum.c:144: undefined reference to SDL_EnableKeyRepeat' /home/userKum/spectrum-master/spectrum.c:199: undefined reference to__log10f_finite'
/home/userKum/spectrum-master/spectrum.c:157: undefined reference to SDL_Flip' /home/userKum/spectrum-master/spectrum.c:158: undefined reference toSDL_Delay'
alsa.o: In function write_alsa': /home/userKum/spectrum-master/alsa.c:71: undefined reference tosnd_pcm_writei'
/home/userKum/spectrum-master/alsa.c:72: undefined reference to snd_pcm_prepare' alsa.o: In functionread_alsa':
/home/userKum/spectrum-master/alsa.c:54: undefined reference to snd_pcm_readi' /home/userKum/spectrum-master/alsa.c:55: undefined reference tosnd_pcm_prepare'
alsa.o: In function close_alsa': /home/userKum/spectrum-master/alsa.c:26: undefined reference tosnd_pcm_drain'
/home/userKum/spectrum-master/alsa.c:27: undefined reference to snd_pcm_close' alsa.o: In functionopen_alsa_read':
/home/userKum/spectrum-master/alsa.c:92: undefined reference to snd_pcm_hw_params_sizeof' /home/userKum/spectrum-master/alsa.c:92: undefined reference tosnd_pcm_hw_params_sizeof'
/home/userKum/spectrum-master/alsa.c:94: undefined reference to snd_pcm_open' /home/userKum/spectrum-master/alsa.c:100: undefined reference tosnd_pcm_hw_params_any'
/home/userKum/spectrum-master/alsa.c:107: undefined reference to snd_pcm_hw_params_set_access' /home/userKum/spectrum-master/alsa.c:114: undefined reference tosnd_pcm_hw_params_set_format'
/home/userKum/spectrum-master/alsa.c:121: undefined reference to snd_pcm_hw_params_set_rate_resample' /home/userKum/spectrum-master/alsa.c:130: undefined reference tosnd_pcm_hw_params_set_rate_min'
/home/userKum/spectrum-master/alsa.c:109: undefined reference to snd_pcm_close' /home/userKum/spectrum-master/alsa.c:137: undefined reference tosnd_pcm_hw_params'
/home/userKum/spectrum-master/alsa.c:144: undefined reference to snd_pcm_hw_params_get_rate' /home/userKum/spectrum-master/alsa.c:151: undefined reference tosnd_pcm_hw_params_get_channels'
alsa.o: In function open_alsa_write': /home/userKum/spectrum-master/alsa.c:177: undefined reference tosnd_pcm_hw_params_sizeof'
/home/userKum/spectrum-master/alsa.c:177: undefined reference to snd_pcm_hw_params_sizeof' /home/userKum/spectrum-master/alsa.c:179: undefined reference tosnd_pcm_open'
/home/userKum/spectrum-master/alsa.c:185: undefined reference to snd_pcm_hw_params_any' /home/userKum/spectrum-master/alsa.c:192: undefined reference tosnd_pcm_hw_params_set_access'
/home/userKum/spectrum-master/alsa.c:199: undefined reference to snd_pcm_hw_params_set_format' /home/userKum/spectrum-master/alsa.c:206: undefined reference tosnd_pcm_hw_params_set_rate_resample'
/home/userKum/spectrum-master/alsa.c:213: undefined reference to snd_pcm_hw_params_set_rate_near' /home/userKum/spectrum-master/alsa.c:218: undefined reference tosnd_pcm_hw_params_set_channels_near'
/home/userKum/spectrum-master/alsa.c:223: undefined reference to snd_pcm_hw_params' /home/userKum/spectrum-master/alsa.c:194: undefined reference tosnd_pcm_close'
window.o: In function sinc': /home/userKum/spectrum-master/window.c:14: undefined reference tosinf'
window.o: In function hann': /home/userKum/spectrum-master/window.c:24: undefined reference tocosf'
window.o: In function hamming': /home/userKum/spectrum-master/window.c:29: undefined reference tocosf'
window.o: In function sinc': /home/userKum/spectrum-master/window.c:14: undefined reference tosinf'
window.o: In function gauss': /home/userKum/spectrum-master/window.c:38: undefined reference to__expf_finite'
stft.o: In function free_stft': /home/userKum/spectrum-master/stft.c:44: undefined reference tofftwf_destroy_plan'
stft.o: In function get_stft': /home/userKum/spectrum-master/stft.c:38: undefined reference tocabsf'
stft.o: In function create_stft': /home/userKum/spectrum-master/stft.c:66: undefined reference tofftwf_plan_dft_r2c_1d'
stft.o: In function slide_stft': /home/userKum/spectrum-master/stft.c:31: undefined reference tofftwf_execute'
cqt.o: In function get_cqt': /home/userKum/spectrum-master/cqt.c:33: undefined reference tocabsf'
cqt.o: In function free_cqt': /home/userKum/spectrum-master/cqt.c:47: undefined reference tofftwf_destroy_plan'
cqt.o: In function create_cqt': /home/userKum/spectrum-master/cqt.c:65: undefined reference to__logf_finite'
/home/userKum/spectrum-master/cqt.c:65: undefined reference to __expf_finite' /home/userKum/spectrum-master/cqt.c:66: undefined reference to__log2_finite'
/home/userKum/spectrum-master/cqt.c:87: undefined reference to fftwf_plan_dft_1d' /home/userKum/spectrum-master/cqt.c:98: undefined reference tocexpf'
/home/userKum/spectrum-master/cqt.c:103: undefined reference to fftwf_execute' /home/userKum/spectrum-master/cqt.c:57: undefined reference tocabsf'
/home/userKum/spectrum-master/cqt.c:57: undefined reference to cabsf' /home/userKum/spectrum-master/cqt.c:115: undefined reference tocabsf'
/home/userKum/spectrum-master/cqt.c:117: undefined reference to cabsf' /home/userKum/spectrum-master/cqt.c:117: undefined reference tocabsf'
/home/userKum/spectrum-master/cqt.c:57: undefined reference to __powf_finite' /home/userKum/spectrum-master/cqt.c:139: undefined reference tofftwf_destroy_plan'
/home/userKum/spectrum-master/cqt.c:146: undefined reference to fftwf_plan_dft_r2c_1d' cqt.o: In functionslide_cqt':
/home/userKum/spectrum-master/cqt.c:30: undefined reference to `fftwf_execute'
collect2: ld returned 1 exit status
make: *** [spectrum] Error 1
我不知道这些 undefined reference 是怎么回事......看起来它在编译过程中缺少与'-lasound'
的链接。我应该怎么做才能解决这个问题?
应部分观众要求,MakeFile如下:
CFLAGS = -g -D_GNU_SOURCE=1 -W -Wall -O3 -std=c99 -fno-math-errno -ffinite-math-only -fno-rounding-math -fno-signaling-nans -fno-trapping-math -fcx-limited-range -fsingle-precision-constant $(shell sdl-config --cflags) $(shell pkg-config fftw3f --cflags)
LDFLAGS = -lm -lasound $(shell sdl-config --libs) $(shell pkg-config fftw3f --libs)
all: spectrum
clean:
rm -f spectrum *.o
spectrum: spectrum.o mmap_file.o pcm.o wav.o alsa.o window.o stft.o cqt.o trans.o
最佳答案
“库需要在对象之后”的另一个经典案例:
您的库,由以下定义
LDFLAGS = -lm -lasound $(shell sdl-config --libs) $(shell pkg-config fftw3f --libs)
鉴于(根据此处)链接规则是:
$(CC) $(LDFLAGS) n.o $(LOADLIBES) $(LDLIBS)
我希望这样
LDLIBS = -lm -lasound $(shell sdl-config --libs) $(shell pkg-config fftw3f --libs)
就可以了,尽管我更喜欢实际编写自己的链接器行,因为不可避免地我最终想确切地知道链接的内容......
(Unix 链接器在处理库时相当简单,因此如果您将 -lsomething x.o
列出到链接器,链接器将不会从 -lsomething 中获取任何内容,并提示 somethingFunc1
(可以在 libsomething.a
中找到)丢失,因为在 x.o
之后找不到它。
关于c++ - 为什么我在安装软件包时收到这样的错误消息?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28018601/
当我做 rpm -qa | grep nano我可以看到 Nano 文本编辑器已安装到我的 CentOS 机器上。 但是当我做 rpm -qpi nano-2.9.8-1.el8.x86_64.rpm
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 想改进这个问题?将问题更新为 on-topic对于堆栈溢出。 4年前关闭。 Improve this qu
我无法使用“yum”命令在RHEL服务器上安装“graphviz” 我下载了graphviz rhel.repo,并将其保存在/etc/yum.repos.d/上,然后使用“yum-y install
我想用 Go 检查 dot 包是否已安装并可在当前 OS 上执行。 我的第一个想法是检查 PATH 变量中的 /dot 字符串?有没有更好的方法来使用 Go 获取可执行/已安装的包? 任何建议都会有所
我已经在我的 ubuntu 上安装了 R(3.4.0)。我想使用 EdgeR 包。我尝试按照 Bioconductor 网站上的安装说明安装 Bioconductor 软件包。 我在 R 中使用了以下
我已经自定义编译了我自己的 ffmpeg 版本,并从这个包中制作了一个 .deb 文件。包描述如下control.txt Package: ffmpeg Version: 4.3-ubuntu1804
我正在尝试构建一个 debian 软件包,它会自动配置我所有的机器以使用相同的配置文件和设置。 例如,我正在尝试设置诸如 alter/etc/default/hostapd 之类的内容。我目前正在通过
我的configuration.nix中有一些要覆盖的软件包。因此,我将代码编写如下: nixpkgs.config = { allowUnfree = true; packageOverri
我想将我的 Ubuntu 从 19.04 升级到 20.04,但在我更新所有软件包之前这是不可能的。 ❯ sudo do-release-upgrade Checking for a new Ubun
我安装了 Homebrew 软件,但是我没有管理员权限。如何在没有管理员访问权限的情况下安装 Homebrew 软件包?是否有本地标签或我一直缺少的东西? 最佳答案 Homebrew 需要 /usr/
我想重建/重新编译具有特定标志的机器的所有 Debian 软件包。 我怎样才能用尽可能少的命令来做到这一点? 我发现 https://debian-administration.org/article
请帮我在 R 中安装 Rmpfr 包。 结果是: 安装包“Rmpfr”的退出状态非零,我无法安装它。 R控制台的代码发布如下: * installing *source* package ‘Rmpfr
有没有办法从这一行下载所有软件包,将它们保存在本地,然后将它们安装到没有互联网连接的机器上? yum install -y qemu-kvm qemu-img virt-manager libvirt
以下 R 命令将安装所有 CRAN 软件包: availablePackages <- available.packages()[,1] install.packages(availablePacka
我正在尝试在 OS X 10.12.6 上安装 RCurl,但出现以下错误: Error: package or namespace load failed for ‘RCurl’ in dyn.lo
我正在尝试自动设置开发人员机器软件安装。当您连接到 Internet 时,Chocolatey 很适合安装软件包。有没有办法离线安装软件包? 我只想将所有包放在共享网络文件夹中并使用该包进行安装。如果
这很奇怪,list-packages 缓冲区将实际安装的某些软件包的状态显示为“可用”。该列不应该为他们显示“已安装”吗?当我单击其中一个时,会打开一个新缓冲区,通知我该软件包已安装,但不提供卸载选项
我刚开始学习 Dart 。 首先,我从https://angular.io/docs/dart/latest/quickstart.html创建了一个基于angular2-dart的项目,它正常工作。
我在 ~/R/i486-pc-linux-gnu-library/2.11 下安装了一些 R 软件包。 我想让它们以及我从现在开始安装的任何其他 R 软件包可供所有 R 用户使用。我不介意在一个中立的
我是Renjin的新手,无法使用AetherPackageLoader安装软件包。我收到与Renjin can't load pckages中相同的错误,但看似正确的Gradle文件(请注意a4Bas
我是一名优秀的程序员,十分优秀!