Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"'portaudio.h' file not found" error in XCode 5.1

I've downloaded the portaudio codebase and compiled it fully with source, and installed it to my system with these commands:

./configure
make
sudo make install

But XCode is complaining to me, even when I put -lportaudio in the Other Linker Flags for the project settings.

enter image description here

I've researched this problem and tried whatever I could find on Stack Overflow, but there was no decisive answer that would work for me. Any advice on how to fix this?

like image 207
syb0rg Avatar asked Apr 08 '14 19:04

syb0rg


1 Answers

I'm using an older version of XCode and haven't bothered looking at how the interface might have changed in the newer versions, but this is generally solved for me by modifying the User Search Paths under your project settings. Look at the screenshot, add /usr/local/include to Header Search Paths and make Always Search User Paths "Yes." That should do the trick

enter image description here


Edit:

One more thing to note, this is only /usr/local/include because that's the default install directory for the portaudio.h file in the portaudio build (as it is with many libraries).

If you have a different prefix other than /usr/local/include, add that instead.

like image 86
photoionized Avatar answered Oct 18 '22 03:10

photoionized