GSL is a math library of GNU. It is free and powerful, and is very suitable for personal mathematics.
under linux is relatively simple to install gsl, there is no difference with the installation of other programs, as follows:
install GSL
The first step: Compile
After downloading and extracting, run the following command in the gsl root directory
./configure --prefix=YOUR_DIRECTORY
For example, I am used to installing in the opt directory, such as /home/user/opt/gsl1.16< Br>
Step 2: make
After the configuration is finished, run the make command, ie
make
Step 3: make install
make install
Step 4: Add environment variables
Use the vi editor to edit the configuration file in the user root directory.
vi ~/.bashrc
Add the following code to the end of the file:
#GSLexport PATH=$PATH:YOUR_DIRECTORY/binexport C_INCLUDE_PATH=$C_INCLUDE_PATH:YOUR_DIRECTORY/includeexport LD_LIBRARY_PATH=$LD_LIBRARY_PATH:YOUR_DIRECTORY/libexport GSL_LD =YOUR_DIRECTORY/lib
The last one is for convenience links.
Use GSL
to edit a test program as follows:
#include#include "gsl/gsl_math.h"int main(void){ double x=5.0; double y= gsl_sf_bessel_J0(x); printf("J0(%g)=%.18e\ ", x, y); return 0;}
Compile file:
gcc -o al.o -c test. c
link file:
gcc -o al.out al.o -lgsl -lgslcblas -L$GSL_LD -lm
or compile the link directly:
gcc -o al.out test.c - Lgsl -lgslcblas -L$GSL_LD -lm
Static link:
gcc -o al.out al.o -lgsl -lgslcblas -L$GSL_LD -static -lm
Slightly larger sites are inevitably load balanced, but hardware load balancing is expensive. There
system to establish IPC communication (such as message queue, shared memory) must specify an ID valu
Linux shared memory Shared memory is a memory area reserved by the system for communication between
The Linux command line is useful, efficient, and fun, but sometimes dangerous, especially if you are
Linux primary and secondary device number introduction
ADSL telephone line interference causes the network to drop frequently
Ld: cannot find /ubuntu/omnibook/sections.lds: No
How to reset MySQL ROOT password under Linux
Linux to view a port usage and kill
The service does not support the solution of chkconfig
High availability of Linux operating system clusters
Method for detecting whether a USB disk is connected under Linux system
What is the meaning of the Linux file name color
Linux operating system program foreground background switching
Win10 Mobile preview version 10512 map tour animation effect is more smooth
IE9: How to fix the page display size when opening all new windows
Win 2000 operation skills complete manual (on)
File Association Changes in Windows XP System
Win 7 adds commands to show hidden files into the right-click menu
Windows10 free upgrade booking process Upgrade win10 booking tutorial
Win7 system internet option can not open the solution