2008年6月10日

How do I use GSL on Visual C++ 2005 ?

This article is originally from the site. Here is its copy.

DOWNLOAD AND INSTALL GSL SOFTWARE

1.Download gsl-1.8.exe from http://sourceforge.net/project/showfiles.php?group_id=23617&package_id=19804
(contains binaries and .lib files)
2.Execute and finish the installation.

3.Download gsl-1.8-src.exe from http://sourceforge.net/project/showfiles.php?group_id=23617&package_id=19804
4.Execute and finish the installation.

BUILD GSL LIBRARIES FOR Visual studio
1. Launch Visual C++ Studio
2. Open project C:\Program Files\GnuWin32\src\gsl\1.8\gsl-1.8\VC8\libgsl.sln (assuming default path - replace if it is a different location)
3. Do a build all
4.Verify that after build is complete, new files are generated in subfolders in C:\Program Files\GnuWin32\src\gsl\1.8\gsl-1.8\VC8\libgsl

CONFIGURE PATH SETTINGS IN VISUAL C++ STUDIO
1.Launch Visual C++ studio
2.Select Tools->Options Menu
3.On the tree display in the Options dialog box, select branch for Projects and solutions->VC++ directories
4.On the right side of the dialog, select Executable files in the "show directories for" combo box and add the following paths:
C:\Program Files\GnuWin32\src\gsl\1.8\gsl-1.8\VC8\libgslcblas\Debug-DLL
C:\Program Files\GnuWin32\src\gsl\1.8\gsl-1.8\VC8\libgsl\Debug-DLL

5.In the "show directories for" combo box select "Include files" and add the following path:
C:\Program Files\GnuWin32\include

6.In the "show directories for" combo box select "Library files" and add the following paths:
C:\Program Files\GnuWin32\src\gsl\1.8\gsl-1.8\VC8\libgsl\Debug-DLL
C:\Program Files\GnuWin32\src\gsl\1.8\gsl-1.8\VC8\libgslcblas\Debug-DLL

HOW DO I USE GSL LIBRARY IN MY VC++ PROJECT?
1.Launch Visual studio
2.Open your VC++ project.
3.select menu Project -> properties
4.In the property pages dialog, select tree item "configration properties->Linker->Input
5.On the right hand side details, choose the field "Additional Dependencies" and append the following entries by clicking the ... button:
libgsl_dll_d.lib
libgslcblas_dll_d.lib

沒有留言: