Code::Blocks and Lapack

若如初见. 提交于 2019-12-08 12:41:31

问题


  • How do you add Lapack libraries to Code::Blocks IDE on Windows?.
  • The files I have are these: (Victor's Compiled binary libraries for Windows on this page: http://www.stanford.edu/~vkl/code/libs.html)

    • lapack_win32.a
    • lapack_win32.def
    • lapack_win32.dll
    • lapack_win32.exp
    • lapack_win32.lib

      • How would look like a simple example in C/C++ using the dynamic library? Do I use #include <lapack>? or how?

回答1:


First assuming you have installed these libraries in C:\LapackLib.

  1. Click on the Settings Menu and then select the Compiler menu item.

  2. From the Compiler Settings Dialog select the Directories Tab.

  3. Click the Add button.

  4. In the window that pops up type in your library path in this example it is C:\LapackLib\.

  5. Select the Linker tab

  6. Repeat steps 3 and 4, then press the Ok button to close the Compiler Settings Dialog

  7. Right click on your project name from the Treeview on the left hand side of the screen, it will in bold.

  8. From the popup menu select the Build Options menu item

  9. Select the Linker tab

  10. From the Link Libraries window, click on the Add button. Select the path to your library from the File Dialog, in this case it is C:\LapackLib\lapack_win32.lib. Then press the Ok Button.

  11. In your source code add the relevant include declaration

    e.g. #include <lapack> or #include "lapack.h"

For further information see the following tutorial or the CodeBlocks manual.



来源:https://stackoverflow.com/questions/6035360/codeblocks-and-lapack

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!