gsl安装(Linux系统)
2016-04-04 02:13
375 查看
1. 在gnu的ftp站点http://ftp.gnu.org/gnu/gsl/ 上, 下载最新的gsl-2.x.tar.gz
2. 解压下载好的gsl-2.x.tar.gz 压缩包,$tar -zxvf gsl-2.x.tar.gz. 这里我下载的是2.1版本, 直接解压在了Downloads文件夹中。
3. $ cd gsl-2.1, 进入到gsl文件夹中, 运行$./configure --prefix=/usr , 该命令指定之后安装的include, lib, bin等文件夹都安装在usr目录下,当然,这个安装路径可以由用户自己随意设置。
4. 相继运行,$make,$make check, $make install, gsl库便安装在了/usr 目录下。
configuration -- in the configuration step all parameters are set to control how to build and install the library.
build -- in the build step binaries are built from the source files.
installation -- the installation copies and rearranges all files that are necessary to build the library to a target directory.
5. 编译:假设我们有一个使用了gsl库的example.cpp 函数,则我们可以直接命令行编译: $g++ example .cpp -L /usr/lib/ -lgsl -lgslcblas -I /usr/include/ -o example.
也可以制作CMakeLists.txt文件,使用cmake进行编译。
至此,我们便可以得到二进制可执行文件。
2. 解压下载好的gsl-2.x.tar.gz 压缩包,$tar -zxvf gsl-2.x.tar.gz. 这里我下载的是2.1版本, 直接解压在了Downloads文件夹中。
3. $ cd gsl-2.1, 进入到gsl文件夹中, 运行$./configure --prefix=/usr , 该命令指定之后安装的include, lib, bin等文件夹都安装在usr目录下,当然,这个安装路径可以由用户自己随意设置。
4. 相继运行,$make,$make check, $make install, gsl库便安装在了/usr 目录下。
configuration -- in the configuration step all parameters are set to control how to build and install the library.
build -- in the build step binaries are built from the source files.
installation -- the installation copies and rearranges all files that are necessary to build the library to a target directory.
5. 编译:假设我们有一个使用了gsl库的example.cpp 函数,则我们可以直接命令行编译: $g++ example .cpp -L /usr/lib/ -lgsl -lgslcblas -I /usr/include/ -o example.
也可以制作CMakeLists.txt文件,使用cmake进行编译。
至此,我们便可以得到二进制可执行文件。
相关文章推荐
- Linux系统中校验下载文件的完整性方法(MD5,SHA1,PGP)
- 【Linux】netdata监控组件
- Linux 下安装配置 JDK1.7
- Linux 创建桌面启动器教程
- 【Linux学习】Linux操作技巧
- linux之cut命令的用法
- CentOS6.5 ping: unknown host 解决方
- linux的学习决心书
- Linux如何创建一个进程?
- CentOS实现回收站机制_Linux教程_Linux公社-Linux系统门户网站
- Linux的freetype矢量字体库安装
- Linux内核分析:实验六
- Linux编程- pthread_barrier_xxx介绍
- Linux技术——gdb调试基础
- 第六周分析Linux内核创建一个新进程的过程
- LinuxC高级编程——线程间同步
- Linux内核设计第六周 ——进程的描述和创建
- linux如何设置无密码登录mysql(如何设置无密码登陆mysql)
- Linux内核分析——进程的描述和创建
- linux下core文件调试方法