I have an static library matrixlib.a
which I use to compile some C
code. This code is compiled with gcc
and it works fine. However I would like to introduce this library into a C++
code and then it's when the problems start.
The way I am compiling the C
code:
gcc -I/matrix/include -O -Wall example.c -c -o example.o
gfortran example.o /matrix/lib/matrixlib.a -lblas -fopenmp -o example_c
If now we swap gcc
for g++
:
example.c:(.text+0xf5): undefined reference to `mygemm_solver(int, double const*, double*, double*, int, int)'
being mygemm_solver
the function that I am using example.c
file. Any ideas of what I am doing wrong?