Otherwise it is also possible to overload a routine by adding it in the link after the library where the other one is defined.
For example, if you have your own DGESV routine (in a file let's say mydegesv.f), that has the same DGESV interface than the one in LAPACK
The following way to link and compile
- Code: Select all
gfortran -c mydgesv.f
gfortran -o myprog.exe myprog.f -llapack mydgesv.o -lblas
should allow you to use your own dgesv routine.
It is not 100% guarantee but most of the time it works.
Julie