Visual Studio 2008中使用科学计算库GSL
来源:互联网 发布:图片透视软件 编辑:程序博客网 时间:2024/05/01 03:37
http://ixpress.spaces.live.com/blog/cns!8BCB40263F366272!683.entry
1. 下载最新版GSL
@ http://gnuwin32.sourceforge.net/packages/gsl.htm 最新的好像是1.9,不过这里只有1.8,估计1.9还在测试,不过无所谓。
需要下载的是前两个文件:Complete package, except sources和Sources。然后安装。
2. 配置VS和GSL
在VS的菜单tools->options->project and solutions->VC++ directiories里面设置include,bin,lib,sources的文件夹,分别对应gsl的安装目录。include就到gsl的 include就行了,不要到include/gsl下面
然后打开GSL的src文件夹,下面有个VC8文件夹,打开里面的libgsl.sln工程文件并编译(把四种库,debug release 静态 动态全编译了)。然后打开输出文件夹,把lib文件拷到gsl根目录的lib,把dll拷到system32
3. 写程序
工程向导win32 控制台程序。生成之后在工程配置里面找到C/C++ Generation下面的Runtime Libary,改成/MT或者/MTD。
链接gsl的库有两种,静态的和动态的
静态要加入libgsl.lib 和 libgslcblas.lib (release) 或者 libgsl_d.lib 和 libgslcblas_d.lib(debug)
动态dll要加入libgsl_dll.lib 和 libgslcblas_dll.lib (release) 或者 libgsl_dll_d.lib 和 libgslcblas_dll_d.lib(debug),此外还要写上#define GSL_DLL
加库可以这样
#pragma comment(lib,"libgsl.lib")
#pragma comment(lib, "libgslcblas.lib")
#pragma comment(lib, "libgslcblas.lib")
4. 其他
然后就欧了。不过在MFC里面好像编译不了静态链接模式的程序,应该是那个/MT冲突之类的,我不知道。实在不行用dll么。
不过这个gsl就不能出个面向对象的么,看见指针数组就烦。
另附英文介绍一篇:http://www.quantcode.com/modules/smartfaq/faq.php?faqid=33
DOWNLOAD AND INSTALL GSL SOFTWARE
1.Download gsl-1.8.exe from http://sourceforge.net/project/showfiles.php?group_id=23617&package_id=19804
(contains binaries and .lib files)
2.Execute and finish the installation.
3.Download gsl-1.8-src.exe from http://sourceforge.net/project/showfiles.php?group_id=23617&package_id=19804
4.Execute and finish the installation.
INSTALL VISUAL C++ EXPRESS
If you have not installed Visual C++ 2005 express, use this link :
http://msdn.microsoft.com/vstudio/express/downloads/
select visual C++ express
BUILD GSL LIBRARIES FOR Visual studio
1. Launch Visual C++ Studio
2. Open project C:/Program Files/GnuWin32/src/gsl/1.8/gsl-1.8/VC8/libgsl.sln (assuming default path - replace if it is a different location)
3. Do a build all
4.Verify that after build is complete, new files are generated in subfolders in C:/Program Files/GnuWin32/src/gsl/1.8/gsl-1.8/VC8/libgsl
CONFIGURE PATH SETTINGS IN VISUAL C++ STUDIO
1.Launch Visual C++ studio
2.Select Tools->Options Menu
3.On the tree display in the Options dialog box, select branch for Projects and solutions->VC++ directories
4.On the right side of the dialog, select Executable files in the "show directories for" combo box and add the following paths:
C:/Program Files/GnuWin32/src/gsl/1.8/gsl-1.8/VC8/libgslcblas/Debug-DLL
C:/Program Files/GnuWin32/src/gsl/1.8/gsl-1.8/VC8/libgsl/Debug-DLL
5.In the "show directories for" combo box select "Include files" and add the following path:
C:/Program Files/GnuWin32/include
6.In the "show directories for" combo box select "Library files" and add the following paths:
C:/Program Files/GnuWin32/src/gsl/1.8/gsl-1.8/VC8/libgsl/Debug-DLL
C:/Program Files/GnuWin32/src/gsl/1.8/gsl-1.8/VC8/libgslcblas/Debug-DLL
HOW DO I USE GSL LIBRARY IN MY VC++ PROJECT?
1.Launch Visual studio
2.Open your VC++ project.
3.select menu Project -> properties
4.In the property pages dialog, select tree item "configration properties->Linker->Input
5.On the right hand side details, choose the field "Additional Dependencies" and append the following entries by clicking the ... button:
libgsl_dll_d.lib
libgslcblas_dll_d.lib
1.Download gsl-1.8.exe from http://sourceforge.net/project/showfiles.php?group_id=23617&package_id=19804
(contains binaries and .lib files)
2.Execute and finish the installation.
3.Download gsl-1.8-src.exe from http://sourceforge.net/project/showfiles.php?group_id=23617&package_id=19804
4.Execute and finish the installation.
INSTALL VISUAL C++ EXPRESS
If you have not installed Visual C++ 2005 express, use this link :
http://msdn.microsoft.com/vstudio/express/downloads/
select visual C++ express
BUILD GSL LIBRARIES FOR Visual studio
1. Launch Visual C++ Studio
2. Open project C:/Program Files/GnuWin32/src/gsl/1.8/gsl-1.8/VC8/libgsl.sln (assuming default path - replace if it is a different location)
3. Do a build all
4.Verify that after build is complete, new files are generated in subfolders in C:/Program Files/GnuWin32/src/gsl/1.8/gsl-1.8/VC8/libgsl
CONFIGURE PATH SETTINGS IN VISUAL C++ STUDIO
1.Launch Visual C++ studio
2.Select Tools->Options Menu
3.On the tree display in the Options dialog box, select branch for Projects and solutions->VC++ directories
4.On the right side of the dialog, select Executable files in the "show directories for" combo box and add the following paths:
C:/Program Files/GnuWin32/src/gsl/1.8/gsl-1.8/VC8/libgslcblas/Debug-DLL
C:/Program Files/GnuWin32/src/gsl/1.8/gsl-1.8/VC8/libgsl/Debug-DLL
5.In the "show directories for" combo box select "Include files" and add the following path:
C:/Program Files/GnuWin32/include
6.In the "show directories for" combo box select "Library files" and add the following paths:
C:/Program Files/GnuWin32/src/gsl/1.8/gsl-1.8/VC8/libgsl/Debug-DLL
C:/Program Files/GnuWin32/src/gsl/1.8/gsl-1.8/VC8/libgslcblas/Debug-DLL
HOW DO I USE GSL LIBRARY IN MY VC++ PROJECT?
1.Launch Visual studio
2.Open your VC++ project.
3.select menu Project -> properties
4.In the property pages dialog, select tree item "configration properties->Linker->Input
5.On the right hand side details, choose the field "Additional Dependencies" and append the following entries by clicking the ... button:
libgsl_dll_d.lib
libgslcblas_dll_d.lib
- Visual Studio 2008中使用科学计算库GSL
- Visual Studio 2008中使用科学计算库GSL
- GSL科学计算函数库在Visual Studio上的配置
- C++科学计算库,gsl
- GSL科学计算库的使用gsl1.8
- 科学计算库GSL在 windows XP 下的使用
- C++科学计算库gsl的使用初步
- C++科学计算库-gsl
- C++科学计算库GSL及其配置
- C++科学计算库GSL及其配置
- GSL科学计算库文档索引翻译
- Ubuntu GSL科学计算库安装配置
- Windows下使用VC++编译GNU科学计算库 GNU Scientific Library(GSL)
- Windows下使用VC++编译GNU科学计算库 GNU Scientific Library(GSL)
- GSL在visual studio 2008下应用
- GSL visual studio 安装
- gsl科学计算库文档,翻译了索引,凑合看看。
- gsl科学计算库文档,翻译了索引
- 重写窗体关闭事件protected override void OnFormClosing(FormClosingEventArgs e)遇到的错误
- HDU 3886 数位DP
- 通过URLConnection的方式访问WebService
- HOOK的实例
- light OJ 1205 数位DP
- Visual Studio 2008中使用科学计算库GSL
- 解决 “fatal error C1902: 程序数据库管理器不匹配;请检查安装” 的方法
- android学习——各个国家语言缩写
- 内存对齐问题
- oracle实用函数
- light OJ 1068 数位DP
- fatal error C1010: 在查找预编译头时遇到意外的文件结尾。是否忘记了向源中添加“#include "stdafx.h
- How to use Git
- Android - API - android.Manifest.permission (权限)