iPhone Linker Error (AudioStreamer) - iphone

I'm using Matt Gallagher's Audio Streaming Project. I downloaded the code/project and it runs/compiles/links just fine.
The problem is when I try to integrate the AudioStreamer class into my own project. I added all the necessary frameworks and checked over the project settings to make sure they match Matt's project as much as possible.
I haven't added any of Matt's code yet (except for the AudioStreamer class). All I'm doing for now is defining this function:
- (void)createStreamer {
streamer = [[AudioStreamer alloc] initWithURL:audiourl];
}
If I comment out the only line in that function the project compiles/links fine. If I leave that line there I get this error (which if I understand correctly is a linker error):
"_OBJC_CLASS_$_AudioStreamer", referenced from:
objc-class-ref-to-AudioStreamer in AudioViewController.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
I googled this error and most people get it because they forgot to include a certain framework. I have all the frameworks I need in my project.
Does anyone know any other reason why this error could occur? Is there some setting that I may be overlooking?
Most of the project settings are the same except for the build architecture being set to arm6,arm7 in Matt's project and i386 on mine. I tried compiling for both simulator and device and I get the same error.
The only thing I could think of is that Matt's project is dated 2009 (pretty old) so maybe something changed in the default configuration in the new xcodes?
If anyone can provide any insight I'd appreciate it.
Thanks.

It sounds like you need to add AudioStreamer.m to your target.

Related

SIGABRT when 'Running' app

GDB: Program received signal "SIGABRT"
I'm running a problem with a few things according to the Build log, please could you shed light on the possibilities that these errors could be caused by. All help is appreciated.
Summary of project:
I have two projects which i have taken some .h, .m and .a files from one project folder, dragged them into the other project, then going through
Menu > Project > Add to project I have imported them into the Static Library of the project.
Some lines of code I have blanked my details out for privacy.
Here are the errors I'm getting...
found branch-22 without store in _SOGLH
found branch-22 without store in TrackerInterface::InstantiateTracker()
ld: warning: ignoring file /Users/myname/Desktop/*projectname*/*It's_a_dot_A_file*.a, file was built for archive which is not the architecture being linked (armv7)
I'm relatively new to Xcode so I'm not confident with some of the terms so please bear that in mind.
King Regards,
R.
For the last error, it is quite self-explanatory: you are trying to include a library (.a) file that has been built for a different architecture.
Probably a library that has been built for OSX-32bits or OSX-64bits and that you are trying to use for iOS (which uses architectures armv6 & armv7).
Rebuild the library for the correct architecture (armv7) of if it is a third-party library, use the appropriate .a file for the appropriate architecture.

Having some build issues on an app developed by someone else: ld: library not found for -lAdServer_Iphone

The build error I am getting is:
ld: library not found for -lAdServer_Iphone
I have experience in making apps from scratch. However the issue I am having is not having enough experience importing existing apps and making them work.
Would someone be able to give me some clarity on this?
Thank You
The error means that you did not copy the library called 'IAdServer_iPhone' to the proper location. To fix this, either get the location the project is linking to and copy the library there, or you can reimport the library from the new location.

"No architectures" error when compiling objective flickr for iphone device

I'm getting the following error when I attempt to compile my XCode project to debug on my device.
No architectures to compile for (ARCHS=x86_64, VALID_ARCHS=armv6 armv7).
I've included ObjectiveFlickr in my project just as the readme describes. I've gone through the process several times and redownloaded objectiveFlickr a few times to start over.
I've gotten objectiveFlickr to work on devices in the past. I don't know why I am suddenly having trouble. Can anybody point me to something that might hold the clue I need? Any other info I need to provide? I made only changes to my project that are specified by the OF documentation.
I also get this error when compiling the included snap-n-run example project provided with OF. So I must be missing something beneath my project.
Thanks,
Charlie
Check out this post for another solution. I have not tested it for release/dist but it works for debug so far.
http://groups.google.com/group/objectiveflickr/browse_thread/thread/ad8e5ec6ba976672
Well, I wasn't able to truly solve this problem. However, after corresponding with Lukhanos, the creator of objflickr, I tried including the objflickr source code directly in my project. After a bit of trial and error to sort out which source files were needed (the "source" directory and the "LFWebAPIKit" directory) and adding the "SystemConfiguration" framework to my project, things are building OK.
Still no clue as to why I was experiencing this issue, but at least I can get my project built now!
Thanks
- Charlie

Framework not found AudioUnit

Been banging my head agains the wall for awhile now.
My Xcode project went a little haywire while refactoring, and refused to build. I've squashed all the other errors, except one last linktime error:
Framework not found AudioUnit
I have the AudioUnit headers, the AudioUnit.framework is included in my project as it was before (Targets > Get Info > General > Linked Libraries > + ), but I cannot figure out why it does not work now. AudioToolbox.framework is also included.
Remove AudioUnit.framework and add CoreAudio.framework
Helped for me: removing AudioUnit.framework, then adding AudioToolbox.framework, Clean, Build
In my case compiler lies about AudioUnit, in fact for project was required only AudioToolbox.framework.
I had already tried swapping out all available audio frameworks (AudioToolbox, CoreAudio and AudioUnit) and no configuration worked. Something funky with Xcode was going on.
I reinstalled Xcode and migrated the code to a new project. Now it builds fine with the exact same frameworks as I had before. A frustrating solution, but a working one nonetheless.

iPhone development Unit Testing Linking Problem

I've been trying to determine the cause of this error for days now. Tried doing simple projects by I could not get the unit tests to work? Does anyone know how to solve this problem?
Building target “ChildTests” of
project “Person” with configuration
“Debug” — (2 errors) Linking
/Users/me/Desktop/Person/build/Debug-iphonesimulator/ChildTests.octest/ChildTests(1
error) ".objc_class_name_Child",
referenced from:
literal-pointer#__OBJC#__cls_refs#Child
in ChildTests.o
symbol(s) not found
collect2: ld returned 1 exit status
...
Pardon me, I am new to iphone development.
The missing symbol is .objc_class_name_Child. I'm guessing you have a class called Child but its implementation file is not being built as part of your test target.
To fix the problem find the file (probably called Child.m) and make sure your test target is checked in the Targets tab of the file's File->Info.
Linker errors normally mean you've neglected to add a framework or static library to your project and/or neglected to add the header import for the library in question.
What unit test library/framework are you using?
If you're new to the platform, you may be causing yourself unnecessary confusion by trying to start out with unit tests. Unit testing can be very beneficial to delivering a stable final product, however, it doesn't seem to me to be a good place to start out. I would suggest you get your app working first and then add unit tests later once you're sure you're going to develop it to completion.