[Speex-dev] How to compile speex with XCode (for iPhone App)?
peterjb at me.com
Fri Apr 9 20:47:16 PDT 2010
On Apr 9, 2010, at 1:50 PM, DevBandit at gmx.net wrote:
> ---> If I now choose "Build > Build" from the Xcode menu I get 30 warnings and 155 errors.
> Most of the errors are
> error: expected '=',',',';','asm' or '__attribute__' before 'void'
> error: #error You now need to define either FIXED_POINT or FLOATING_POINT
> Any idea which settings I have to change in order to get the speex code compiled?
I have an iphone project with speex built in. I had to add these macros to the preprocessor definitions:
Values: USE_KISS_FFT=1 EXPORT= FIXED_POINT=1
The EXPORT macro takes care of the "expected '=',',',';','asm' or '__attribute__' before 'void'" error by simply making the word EXPORT disappear throughout the source; I have no idea if this is the best way to handle it or not, it seems reasonable to me since I'm building it into an executable, but I admit to being in way over my head when it comes to building C libraries.
After that I had to add the speex include directory to the project's search path like this:
(Assuming, of course, that you've copied the whole speex project folder into your project directory.)
As I recall that was pretty much all it took to get XCode to build it. I don't know if it's the "proper" way to do it, but it works.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3675 bytes
Desc: not available
Url : http://lists.xiph.org/pipermail/speex-dev/attachments/20100409/6e51403e/attachment.bin
More information about the Speex-dev