Query re: cblas linking issue

Having a tough first time linking a cpp programme and making use of cblas for the first time.

I have obtained the 'libcblas.a' library and currently it is on desktop. I am running the following from the directory containing 'my_code.cpp' and 'cblas.h':

g++ -c my_code.cpp

Followed by

g++ my_code.o -L ~/Desktop -lcblas

Which returns

/home/bob/Desktop/libcblas.a(cblas_dgemm.o): In function `cblas_dgemm':
cblas_dgemm.c:(.text+0xf3): undefined reference to `dgemm_'
cblas_dgemm.c:(.text+0x1d3): undefined reference to `dgemm_'
collect2: error: ld returned 1 exit status

I have also tried putting 'libcblas.a' in

/usr/local/lib

And running

g++ -c my_code.cpp

Followed by

g++ my_code.o -lcblas

Which returns

//usr/local/lib/libcblas.a(cblas_dgemm.o): In function `cblas_dgemm':
cblas_dgemm.c:(.text+0xf3): undefined reference to `dgemm_'
cblas_dgemm.c:(.text+0x1d3): undefined reference to `dgemm_'
collect2: error: ld returned 1 exit status

Really new to this all, appreciate any guidance.