Author Topic: Installing GSL on Windows XP 32bit  (Read 4353 times)

Offline havarti

  • Single posting newcomer
  • *
  • Posts: 9
Installing GSL on Windows XP 32bit
« on: January 07, 2013, 11:17:49 pm »
Hi

I know my question isn't directly related to Code::Blocks, but I thought I might get some help here. I'm trying to install GSL on my XP 32bit machine, and I am struggling a lot with this. The plan is afterwards to link it to Code::Blocks.

So far what I have done is to download the 6MB package from here http://gnuwin32.sourceforge.net/packages/gsl.htm (the top link that says "Complete package, except sources"). I've also installed it. Can anyone give me a hint to what the next step from here?

I would be very happy to recieve some feedback.

Best,
Niles.
« Last Edit: January 07, 2013, 11:23:31 pm by havarti »

Max

  • Guest
Re: Installing GSL on Windows XP 32bit
« Reply #1 on: January 08, 2013, 01:43:26 pm »
Yes is not related to CB but I hope devs will forgive me....

The package you used is old ( 1.8 ) It should compile but is old. I'm using the following steps

1) for GCC

Install MSYS from MinGW http://sourceforge.net/projects/mingw/files/MSYS/Base/
download a recent GSL source (1.15) from the official GSL site
set the CFLAGS environment option using in a MSYS shell
 
 CFLAGS="-O2 -fexceptions -mthreads -DHAVE_INLINE -DGSL_DISABLE_DEPRECATED -DGSL_RANGE_CHECK=0"
 export CFLAGS

using the command shell do the usual four steps
 a) ./configure --disable-shared     (read the doc to add some compilation options)
 b) make
 c) make check
 d) make install



 "make check" is a testing set of programs. Usually the Montecarlo routines fails due to a bug of GCC (GCC 4.7.2 from MinGW is OK it has the bug fixed, more recent versions fails). You can ignore the fails or edit the Makefile in the Monte directory adding -ffloat-store to the CFLAGS after the configure step.

Copy the header files from /usr/local/include ad the library file from /usr/local/lib to a more convenient directory.

This is the procedure I'm using since years, it works. It's also possible to use the cygwin environment (instead of using MSYS) but I never used cygwin and I don't know if there is any difference.

2) for Visual C++ or INTEL use

http://gladman.plushost.co.uk/oldsite/computing/gnu_scientific_library.php

Hope this helps

Max


« Last Edit: January 08, 2013, 01:46:51 pm by MaxGaspa »