Reputation: 39
I'm not sure whether it is a correct place to ask this question. If not, I apologize. I followed the online tutorial to install the Lapack on my Mac successfully and past the test. It gave me three new files after installation:
libtmglib.a, liblapack.a and librefblas.a
I know all the functions and subroutines are included in these three files. Can I call them out directly in my Fortran codes or should I put them in some specific library path or folders first. Is there anyone able to help me for the next step?
Upvotes: 0
Views: 284
Reputation: 1584
I think you might be mixing two steps together.
You can simply call the LAPACK routines in your program. The linker will look in the linked libraries for any function signature that is not already resolved by a function in your source code. A nice little example can be found here:
http://www.tek-tips.com/viewthread.cfm?qid=1678628
It is for windows but pretty much the same applies for Unix. Pay special attention to the flags
-L. -lliblapack
Those instruct the linker to look for libraries in your current directory (-L.) and to link the library called liblapack.lib (on Unix use -llapack to have the linker look for liblapack.a) Note that the extension is purposefully omitted and the the first l comes from the -l flag. You can find more documentation on this on the web. I would suggest you try the example in the link and ask questions with specific code examples from there on if you run into issues.
Upvotes: 1