2008年6月10日

Building GSL 1.8 under Windows Step By Step

This article is from the discussion thread at this page


Assuming you use Visual C++ 2005 - Studio Vers. 8.

// 1) Get the sourcecode
- Download the sources:
http://gnuwin32.sourceforge.net/downlinks/gsl-src-zip.php
- decompress

// 2) Configure
- Open the config.h.msvc in the VC8 directory
- change "#define HAVE_DECL_LOG1P 1" entry to "#define HAVE_DECL_LOG1P 0"
(just to be on the safe side: change all #define HAVE_... 1 to 0)

// 3) Make
- open the visual studio solution libgsl.sln in the VC8 directory.
- Build->Batch Build
- Check the configurations you need (DLL/Static/Debug/Release) and build them
(if you don't know what you need, check everything EXCEPT the 4 install_libgsl
entries)

// 4) Install
- Open the Property Page of the install_libgsl project (SolutionExplorer->right
click->Properties)
- Select "All Configurations"
- Go to Configuration Properties -> Build Events -> Pre-Build Event
- Edit the command line (click [...])
- Change the install location in the second line (to your GnuWin32 directory)
(If you installed the gsl win32 binaries with standard paramteres that's
C:\GnuWin32)
- Build the "install_libgsl" project (SolutionExplorer -> right click -> build)

// 4.1) Fix the directory error
If there are no .lib or .dll files in the /lib and /bin directory the copy
source directories are wrong:
- Go to the Pre-Buil Event command line again (see Step 4)
In my version there where whitespaces in all Debug-StaticLib,
Release-StaticLib,
Debug-DLL, Release-DLL entries
If you are finished with step 3) those should be the same as your build output
directories
- Just change everything that looks like this: ../Debug - Static Lib/..
to ../Debug-StaticLib/..
( The same with: Release - Static Lib, Debug - DLL, Release DLL)
- Build the "install_libgsl" project

沒有留言: