안녕하세요.개발자님들
  
  아이폰프로그래밍 한걸음한걸음씩 힘들게 전진해가고있어요.
  이제는 IB사용도 어지간해졌고 NavigationBar, TabBar, Modal View , TableView, View Transition, AlertView 등에 대해서 한번씩 내손으로 코드완성시켜보았어요.
  제일 중요하게는 Objective-C에서 카테고리나  프로토콜,델리게이트개념을 오브젝트지향적인 관점에서 Visual C++과 대비적으로 ,실제 xCode상에서 자신이 그 매력을 직접 체험 및 스터디한거예요.
  이제 약간 감이 들만해요. 
  여러분들이 답변 준데 대해 감사하게 생각해요.
  하지만 이제 겨우 시작인거죠.
  군말이 많았어요.

   이번에는 오디오재생해보려고 하는데 또 치명적인 문제와 맞다들었어요.
   코드구현절차는 다음과 같애요.
   (아참, 저의 작업환경은 VMWare7.1/ MAC OS x10.6.6 / xCode4.0 and iPhone SDK 4.3 )
 
  1. AVFoundation.Framework를 내프로젝트에 성과적으로 추가했어요.(Framworks에서 확인함) 
  2. #import <AVFoundation/AVFoundation.h>
  3. .h파일에 AVAudioPlayer *myPlayer;
  4. .m파일에서
        
    NSString *audioFilePath = [[NSBundle mainBundle] pathForResource:@"1" ofType:@"mp3"];
    NSURL *url = [NSURL fileURLWithPath:audioFilePath];
    
    //NSURL *url = [NSURL fileURLWithPath:@"1.mp3"];
    NSError *err;
    myPlayer= [[AVAudioPlayer alloc] initWithContentsOfURL:url error:&err];
    if (myPlayer == nil) {
   }
   else [myPlayer play];
   
   물론 dealloc()에서 메모리해지는 해주었구요.(부차적인것이므로 쓰지 않겠음)
   
   5.컴파일하면 워닝1개와 에러 1개 나와요.  

ld: warning: ignoring file /Users/mac/project/test5/AVFoundation.framework/AVFoundation, missing required architecture i386 in file
Undefined symbols for architecture i386:
  "_OBJC_CLASS_$_AVAudioPlayer", referenced from:
      objc-class-ref in test5AppDelegate.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status

Ignoring file /Users/mac/project/test5/AVFoundation.framework/AVFoundation, missing required architecture i386 in file

"_OBJC_CLASS_$_AVAudioPlayer", referenced from:

Objc-class-ref in test5AppDelegate.o

Symbol(s) not found for architecture i386

Collect2: ld returned 1 exit status

  여기서 막혀버렸어요.구글링해보니까 이런 오유가 xCode4에서 허다하더군요.그러나 해법은 별로...
  여러 고수님들 좀 도와주세요.

   
이 게시물을..