I have installed MinGW and MSYS on Microsoft Windows (64bit), inside directory C:\MinGW
(MSYS directory is C:\MinGW\msys\1.0
). I have downloaded the latest GNU Scientific Library (GNU GSL) package from the official ftp.
I have used MSYS to perform configure
and make
successfully as described in the INSTALL
file in the GSL package. That means, in the MSYS command-line interface, in the MSYS home
directory, I have inserted:
$ ./configure
$ make
$ make install
This produces a local
directory under the MSYS directory (C:\MinGW\msys\1.0
) including the directories bin
, include
, lib
, and share
.
I have successfully compiled the example program (which computes the value of the Bessel function $J_0 (x)$ at $x = 5$) according to the instructions in the GSL manual, by
$ gcc -Wall -I/usr/local/include -c example.c
This results in an object file example.o
, as expected, without any error messages.
The object file is linked, according to the instructions by
$ gcc -L/usr/local/lib example.o -lgsl -lgslcblas -lm
This produces an executable a.exe
which can be executed in the MSYS environment.
However, in a Windows command-line interface, cmd.exe
, trying to run the executable gives the following error message:
The program can't start because libgsl-0.dll is missing from your computer. Try reinstalling the program to fix this problem.
I wonder what is missing? What should one do to produce the executable file?