I know I'm swimming with the sharks here, so this will be an awfully silly question, but I really really need help installing/setting up GnuWin32 on my Windows computer. I know I need a C compiler. Is Miracle C alright? If so, once I've installed both Miracle C and GnuWin32, how do I get Miracle C to recognize the GSL libraries? I know I'm suppose to 'point my linker and compiler to the GnuWin directory' but I don't know which one specifically. Once that is done, and I'm trying to write a program, do I call GSL routines like functions in C? If so, which folder are they located in? I'm clearly very lost and any help is appreciated. Thank you!!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
gsl is a library of routines callable from C functions (although in principle the dll could be called from other languages also). So, yes, you need to write a C program that calls the functions you want, then compile your program and link against the gsl library. This usually means that you link against a gsl import library compatible with your linker and then make sure the dll's are available when running your program. You can also link against the gsl static libraries and then not have to have the dll available.
"Compatible with your linker" is the rub. If you use a gcc port (e.g. MinGW) then you can use the import libraries (*.a files ) in the lib subdirectory directly. For most other linkers you'd need to compile a static library or generate import linraries from the dll's. That's some work, or at least requires a reasonable knowledge of the tools. A lot of people use VC++ so there's some know-how around for that compiler. The easiest is to use a gcc port like MinGW so you can just use the files in the gsl distribution.
Many of the subdirectories in the gsl source tree have test programs already written. If you can get them compiling, you'll know that you have the right libraries & headers & settings. The documentation has some info on programming the various functions also.
Good luck.
Jerry
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I know I'm swimming with the sharks here, so this will be an awfully silly question, but I really really need help installing/setting up GnuWin32 on my Windows computer. I know I need a C compiler. Is Miracle C alright? If so, once I've installed both Miracle C and GnuWin32, how do I get Miracle C to recognize the GSL libraries? I know I'm suppose to 'point my linker and compiler to the GnuWin directory' but I don't know which one specifically. Once that is done, and I'm trying to write a program, do I call GSL routines like functions in C? If so, which folder are they located in? I'm clearly very lost and any help is appreciated. Thank you!!
gsl is a library of routines callable from C functions (although in principle the dll could be called from other languages also). So, yes, you need to write a C program that calls the functions you want, then compile your program and link against the gsl library. This usually means that you link against a gsl import library compatible with your linker and then make sure the dll's are available when running your program. You can also link against the gsl static libraries and then not have to have the dll available.
"Compatible with your linker" is the rub. If you use a gcc port (e.g. MinGW) then you can use the import libraries (*.a files ) in the lib subdirectory directly. For most other linkers you'd need to compile a static library or generate import linraries from the dll's. That's some work, or at least requires a reasonable knowledge of the tools. A lot of people use VC++ so there's some know-how around for that compiler. The easiest is to use a gcc port like MinGW so you can just use the files in the gsl distribution.
Many of the subdirectories in the gsl source tree have test programs already written. If you can get them compiling, you'll know that you have the right libraries & headers & settings. The documentation has some info on programming the various functions also.
Good luck.
Jerry