windows 代码::块和 Lapack

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6035360/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 16:52:05  来源:igfitidea点击:

Code::Blocks and Lapack

c++cwindowscodeblockslapack

提问by cMinor

  • How do you add Lapacklibraries to Code::BlocksIDE 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?
  • 您如何将Lapack库添加到Code::BlocksIDE 上Windows
  • 我拥有的文件是:(维克多Compiled binary libraries for Window在此页面上的文件:http: //www.stanford.edu/~vkl/code/libs.html

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

      • 使用动态库的 C/C++ 中的简单示例如何?我用#include <lapack>吗?或者怎么样?

采纳答案by Appleman1234

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

首先假设您已经在 C:\LapackLib 中安装了这些库。

  1. Click on the SettingsMenu and then select the Compilermenu item.

  2. From the Compiler SettingsDialog select the DirectoriesTab.

  3. Click the Addbutton.

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

  5. Select the Linkertab

  6. Repeat steps 3 and 4, then press the Okbutton to close the Compiler SettingsDialog

  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 Optionsmenu item

  9. Select the Linkertab

  10. From the Link Librarieswindow, click on the Addbutton. Select the path to your library from the File Dialog, in this case it is C:\LapackLib\lapack_win32.lib. Then press the OkButton.

  11. In your source code add the relevant include declaration

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

  1. 单击设置菜单,然后选择编译器菜单项。

  2. 编译器设置对话框中选择目录选项卡。

  3. 单击添加按钮。

  4. 在本示例中,在弹出的库路径中键入的窗口是C:\LapackLib\.

  5. 选择链接器选项卡

  6. 重复步骤 3 和 4,然后按Ok按钮关闭编译器设置对话框

  7. 在屏幕左侧的 Treeview 中右键单击您的项目名称,它将以粗体显示

  8. 从弹出菜单中选择Build Options菜单项

  9. 选择链接器选项卡

  10. 链接库窗口中,单击添加按钮。从文件对话框中选择库的路径,在本例中为 C:\LapackLib\lapack_win32.lib. 然后按确定按钮。

  11. 在您的源代码中添加相关的包含声明

    例如#include <lapack>#include "lapack.h"

For further information see the following tutorialor the CodeBlocks manual.

有关更多信息,请参阅以下教程或 CodeBlocks手册