title: link error __stack_chk_fail (using libs with xcode)
body: <p>I'm trying to compile a C++ app in xcode using gcc 4.0 and and the 10.4u SDK.</p>
  
  <p>I get the following linker error.</p>
  
  <p>"<strong>_stack_chk_fail", referenced from:
        _read_frame_ in libAudioDecoder.a(stream_decoder.o)
        _read_metadata_ in libAudioDecoder.a(stream_decoder.o)
    "</strong>_stack_chk_guard", referenced from:
        ___stack_chk_guard$non_lazy_ptr in libAudioDecoder.a(stream_decoder.o)
       (maybe you meant: ___stack_chk_guard$non_lazy_ptr)
  ld: symbol(s) not found</p>
  
  <p>Other help threads suggest that all I need to do is add...</p>
  
  <p>-fno-stack-protector</p>
  
  <p>...to the 'Other C Flags', which is what I've done, but the problem persists. I've done cleans, rebuilds and even restarted XCode (because it's been known to get confused sometimes), but the problem persists.</p>
  
  <p>Note that libAudioDecoder is my own library that I'm trying to link with. stream_decoder.o is apart of the FLAC library which libAudioDecoder links to.</p>
  
  <p>Essentially my project links with libAudioDecoder which links with libFlac, where libFlac has also been compile using an xcode project.</p>
  
  <p>For each three xcode projects, I'm using gcc 4.0 and and the 10.4u SDK and have 'Other C Flags' and 'Other C++ Flags' set with -fno-stack-protector.</p>
  
  <p>I'm all out of ideas at the moment, so would appreciate some help with this.</p>
  
  <p>Cheers.</p>