title: Compiling with Accelerate Framework on OSX Yosemite
body: <p>I have recently upgraded to Yosemite but seem to have a problem compiling C++ programs that use Accelerate Framework with the gcc-4.9 obtained through homebrew. I was wondering if anyone has any solutions for this? This was not a problem on previous OSX versions.</p>
  
  <p>For as an example consider compiling the following code.</p>
  
  <pre><code>#include&lt;iostream&gt;
  #include&lt;Accelerate/Accelerate.h&gt;
  using namespace std;
  {
  return 0;
  }
  </code></pre>
  
  <p>When compiling with clang every thing works (Apple LLVM version 6.0 (clang-600.0.54)) : </p>
  
  <pre><code>clang++ -flax-vector-conversions -o main.out main.cpp -framework Accelerate
  </code></pre>
  
  <p>But when compiling with g++-4.9 (g++-4.9 (Homebrew gcc49 4.9.1) 4.9.1) : </p>
  
  <pre><code>g++-4.9 -flax-vector-conversions -o main.out main.cpp -framework Accelerate
  </code></pre>
  
  <p>I get the following compile errors : </p>
  
  <pre><code>    &gt; g++-4.9 -flax-vector-conversions -o main.out main.cpp -framework Accelerate
      In file included from /usr/include/os/object.h:27:0,
                       from /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/base.h:6,
                       from /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/LinearAlgebra.h:10,
                       from /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vecLib.h:65,
                       from /System/Library/Frameworks/Accelerate.framework/Headers/Accelerate.h:20,
                       from main.cpp:2:
      /usr/include/os/base.h:113:20: error: missing binary operator before token "("
       #if __has_extension(attribute_overloadable)
                          ^
      /usr/include/os/base.h:119:54: error: missing binary operator before token "("
       #if __has_feature(objc_fixed_enum) || __has_extension(cxx_strong_enums)
                                                            ^
      In file included from /usr/include/dispatch/dispatch.h:51:0,
                       from /System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:56,
                       from /System/Library/Frameworks/CoreGraphics.framework/Headers/CGDisplayConfiguration.h:8,
                       from /System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:41,
                       from /System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage_Utilities.h:14,
                       from /System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage.h:200,
                       from /System/Library/Frameworks/Accelerate.framework/Headers/Accelerate.h:24,
                       from main.cpp:2:
      /usr/include/dispatch/object.h:143:15: error: expected unqualified-id before '^' token
       typedef void (^dispatch_block_t)(void);
                     ^
      /usr/include/dispatch/object.h:143:15: error: expected ')' before '^' token
      /usr/include/dispatch/object.h:362:3: error: 'dispatch_block_t' has not been declared
         dispatch_block_t notification_block);
  
     ^
  </code></pre>