[opus] Compiling opus for iOS Platform

abid khan abidk999 at gmail.com
Fri Mar 8 00:05:52 PST 2013


Thanks for the replies, guys! While I can successfully compile for Mac OS X
on the CLI, I want to use the Xcode GUI for compiling this for iOS.

http://stackoverflow.com/questions/12516650/opus-audio-codec-encoding-for-iphone/12973685#12973685mentions
"For me it builds directly on Xcode. No need to use cross
compilers. I am compiling it for iOS."

When I imported the source code in Xcode and tried to build (with "Build
Settings > Valid Architectures" set to "armv7 armv7s"), I saw the errors
copied below:

Ld
/Users/abidk/Library/Developer/Xcode/DerivedData/opus2-hkkhqrfaphrbsedkkqvdrdhwphop/Build/Products/Debug-iphonesimulator/opus2.app/opus2
normal i386
      cd /Users/abidk/opus/opus2
      setenv IPHONEOS_DEPLOYMENT_TARGET 6.1
      setenv PATH
"/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
-arch i386 -isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk
-L/Users/abidk/Library/Developer/Xcode/DerivedData/opus2-hkkhqrfaphrbsedkkqvdrdhwphop/Build/Products/Debug-iphonesimulator
-L/Users/abidk/opus/opus2/..
-F/Users/abidk/Library/Developer/Xcode/DerivedData/opus2-hkkhqrfaphrbsedkkqvdrdhwphop/Build/Products/Debug-iphonesimulator
-filelist
/Users/abidk/Library/Developer/Xcode/DerivedData/opus2-hkkhqrfaphrbsedkkqvdrdhwphop/Build/Intermediates/opus2.build/Debug-iphonesimulator/opus2.build/Objects-normal/i386/opus2.LinkFileList
-Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime
-Xlinker -no_implicit_dylibs -mios-simulator-version-min=6.1 -framework
UIKit -framework Foundation -framework CoreGraphics -o
/Users/abidk/Library/Developer/Xcode/DerivedData/opus2-hkkhqrfaphrbsedkkqvdrdhwphop/Build/Products/Debug-iphonesimulator/opus2.app/opus2

Undefined symbols for architecture i386:
   "_opus_decode", referenced from:
       _main in opus_demo.o
   "_opus_decoder_create", referenced from:
       _main in opus_demo.o
   "_opus_decoder_ctl", referenced from:
       _main in opus_demo.o
   "_opus_decoder_destroy", referenced from:
       _main in opus_demo.o
   "_opus_encode", referenced from:
      _main in opus_demo.o
   "_opus_encoder_create", referenced from:
      _main in opus_demo.o
   "_opus_encoder_ctl", referenced from:
      _main in opus_demo.o
   "_opus_encoder_destroy", referenced from:
      _main in opus_demo.o
   "_opus_get_version_string", referenced from:
     _main in opus_demo.o
   "_opus_strerror", referenced from:
     _main in opus_demo.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see
invocation)

Any ideas about what step I am missing here?

Thanks in advance!

AK

On Thu, Mar 7, 2013 at 12:25 PM, Ralph Giles <giles at thaumas.net> wrote:

> On 13-03-07 12:05 AM, abid khan wrote:
>
> > I am trying to compile the opus-1.0.2 source code for ios. When I import
> > the files in Xcode and try to build, the build fails.
>
>
>
> > How can we successfully compile opus using Xcode? Are there any special
> > configurations?
>
> It's fairly straightforward. I suggest using Makefile.unix as a guide to
> what defines to set.
>
> If you share specific error messages we can offer more specific guidance.
>
>  -r
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.xiph.org/pipermail/opus/attachments/20130308/158170f6/attachment.htm 


More information about the opus mailing list