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
Code::Blocks and Lapack
提问by cMinor
- How do you add
Lapack
libraries toCode::Blocks
IDE onWindows
?. The files I have are these: (Victor's
Compiled binary libraries for Window
s 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?
- How would look like a simple example in C/C++ using the dynamic library?
Do I use
- 您如何将
Lapack
库添加到Code::Blocks
IDE 上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>
吗?或者怎么样?
- 使用动态库的 C/C++ 中的简单示例如何?我用
采纳答案by Appleman1234
First assuming you have installed these libraries in C:\LapackLib.
首先假设您已经在 C:\LapackLib 中安装了这些库。
Click on the SettingsMenu and then select the Compilermenu item.
From the Compiler SettingsDialog select the DirectoriesTab.
Click the Addbutton.
In the window that pops up type in your library path in this example it is
C:\LapackLib\
.Select the Linkertab
Repeat steps 3 and 4, then press the Okbutton to close the Compiler SettingsDialog
Right click on your project name from the Treeview on the left hand side of the screen, it will in bold.
From the popup menu select the Build Optionsmenu item
Select the Linkertab
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.In your source code add the relevant include declaration
e.g.
#include <lapack>
or#include "lapack.h"
单击设置菜单,然后选择编译器菜单项。
从编译器设置对话框中选择目录选项卡。
单击添加按钮。
在本示例中,在弹出的库路径中键入的窗口是
C:\LapackLib\
.选择链接器选项卡
重复步骤 3 和 4,然后按Ok按钮关闭编译器设置对话框
在屏幕左侧的 Treeview 中右键单击您的项目名称,它将以粗体显示。
从弹出菜单中选择Build Options菜单项
选择链接器选项卡
在链接库窗口中,单击添加按钮。从文件对话框中选择库的路径,在本例中为
C:\LapackLib\lapack_win32.lib
. 然后按确定按钮。在您的源代码中添加相关的包含声明
例如
#include <lapack>
或#include "lapack.h"
For further information see the following tutorialor the CodeBlocks manual.