簡體   English   中英

./configure 找不到頭文件

[英]./configure unable to find header files

我正在編譯一個使用 SDL_mixer 播放.ogg文件的項目。 但是, Mix_Init(MIX_INIT_OGG)失敗,並且Mix_GetError()返回"Mixer not built with Ogg Vorbis support" 我使用的 SDL_mixer 版本是 1.2.12,通過 Homebrew 下載。

因此,我下載了 SDL_mixer(相同版本,1.2.12)的源代碼,並嘗試使用 Ogg 支持構建它,即./configure --enable-music-ogg ,但configure無法找到 Vorbis 頭文件。 這是它給出的輸出:

checking vorbis/vorbisfile.h usability... no
checking vorbis/vorbisfile.h presence... no
checking for vorbis/vorbisfile.h... no
checking for ov_open_callbacks in -lvorbisfile... no
configure: WARNING: *** Unable to find Ogg Vorbis library (http://www.xiph.org/)
configure: WARNING: Ogg Vorbis support disabled

我什至嘗試通過--includedir=/usr/local/includeconfigure ,但沒有成功。 我在/usr/local/include有 Vorbis 和 Ogg 頭文件,所以例如vorbisfile.h的路徑是/usr/local/include/vorbis/vorbisfile.h 我還嘗試從頭開始構建 libogg 和 libvorbis,但我仍然遇到相同的錯誤。 我正在使用 OS X 10.11.1 測試版。

我究竟做錯了什么?


編輯

brew ls sdl_mixer輸出:

/usr/local/Cellar/sdl_mixer/1.2.12/include/SDL/SDL_mixer.h
/usr/local/Cellar/sdl_mixer/1.2.12/lib/libSDL_mixer-1.2.0.dylib
/usr/local/Cellar/sdl_mixer/1.2.12/lib/pkgconfig/SDL_mixer.pc
/usr/local/Cellar/sdl_mixer/1.2.12/lib/ (2 other files)

你現在可以跑

brew install sdl2_mixer --with-libvorbis

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM