开发者

how to use lapack under windows

I want to use lapack and make C++ matrix wrapper for it, but lapack is written in Fortran, there are some clapack but I want to use it from source. compile firstly *.f and *.cpp files to object files开发者_如何学JAVA then link it into a application..

the following apps and sources that I have.

  • visual studio proff edition,dev c++,ultimate++,mingw whatever
  • g95 and gfortran (under mingw) compiler
  • lapack (latest source)
  • blas (included in lapack)

How can I make an application please help...

My Operating System is Windows 7 and CPU Core2Duo and I dont have Intel math kernel


You can use the official C bindings for LAPACK, and then build your C++ wrapper around that. That avoids the issue of having to worry about the Fortran calling conventions, and the C bindings are a bit friendlier for C/C++ programmers than calling the Fortran routines directly.

Additionally, you could use one of the C++ matrix libraries that are already available, instead of rolling your own. I recommend Eigen.

PS.: Eigen matrices/vectors have a data() member that allows calling LAPACK without having to make temporary copies.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜