title: Cannot link the BLAS from Accelerate Framework during compilation -OS Yosemite 10.0.5
body: <p>I created a matrix multiplicity code for an assignment but could not get the function working, so I suspect it is the BLAS lib not linked properly.
  In OS X, the BLAS has been built into the Accelerate Framework, so in makefile I linked the lib by <code>-framework Accelerate</code>and in cpp I also include the header by <code>#include&lt;Accelerate/Accelerate.h&gt;</code></p>
  
  <p>During compilation, my error is:</p>
  
  <pre><code>Undefined symbols for architecture x86_64:
  "dgemm_(char*, char*, int*, int*, int*, double*, double*, int*, double*, int*, double*, double*, int*)"
  </code></pre>
  
  <p>So I created a simple test code but I still get the error during compilation:</p>
  
  <pre><code>test_2.cpp:35:3: error: use of undeclared identifier 'dgemm_'
    dgemm_(&amp;TRANSA, &amp;TRANSB, &amp;M, &amp;N, &amp;K, &amp;ALPHA, A, &amp;LDA, B, &amp;LDB, &amp;BETA, ...
    ^
    1 error generated.
  </code></pre>
  
  <p>My simple test code is compiled with </p>
  
  <pre><code> clang++  -o test_2.exe test_2.cpp -framework Accelerate
  </code></pre>
  
  <p>My simple code is :</p>
  
  <pre><code>#include &lt;cstdlib&gt;
  #include &lt;cstdio&gt;
  #include &lt;cstring&gt;
  #include &lt;iostream&gt;
  #include &lt;cfloat&gt;
  #include &lt;cmath&gt;
  #include &lt;sys/time.h&gt;
  #ifdef __APPLE__
  #include &lt;Accelerate/Accelerate.h&gt;
  #else
  #include &lt;cblas.h&gt;
  #endif
  
  using namespace std;
  int main( int argc, char **argv )
  {
   int n=10;
   int N=n;
   double *A = (double*) malloc( n * n * sizeof(double) );
   double *B = (double*) malloc( n * n * sizeof(double) );
   double *C = (double*) malloc( n * n * sizeof(double) );
   char TRANSA = 'N';
   char TRANSB = 'N';
   int M = N;
   int K = N;
   double ALPHA = 1.;
   double BETA = 0.;
   int LDA = N;
   int LDB = N;
   int LDC = N;
   dgemm_(&amp;TRANSA, &amp;TRANSB, &amp;M, &amp;N, &amp;K, &amp;ALPHA, A, &amp;LDA, B, &amp;LDB, &amp;BETA, C, &amp;LDC);
   return 0;
  }
  </code></pre>