views:

24

answers:

1

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.

+1  A: 

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

tc.
Yeah that's it, I just found that out through another post. The key to finding the answer was searching for 'collect2: ld returned 1 exit status' instead of the first line. Thanks.. I wasted so much time on this. I don't know why it wasn't set by default since I created this class and then copy pasted the code in.
Nebs