We have a problem. We are trying to use GSL (for calculating eigen values). We have installed the windows version of it. The library gets compiled and linked with the documentation's test program, but the program gives an access violation as soon as any function of the library is called.
Do we have to install some other support libraries, or is there some memory allocation problem? So far we are linking the test program with gsllib.lib only
Looking forward for a kind reply
O.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You say the "library gets compiled and linked". Do you mean that you are compiling the gsl library itself, or just that you're trying to link your program against the library? The only libs distributed are a MinGW static lib and dll (with associated import lib). I'd be surprised if you could link against these using VC6. Have you perhaps generated a VC6 import lib for the dll, and the program crashes when run using the MinGW-generated dll? Or, are you compiling the library from source using VC6? If so, did you generate a VC6 project, or are you somehow trying to use the VC7 projects in the distribution?
If you're compiling the library, there aren't too many tricks. One problem others have faced is the use of repeated source file names in different subdirectories. VC7 handles this fine, but earlier versions had problems. It does take a little tweaking to get the config.h right - see the one in the VC7 subdirectory for one that works (with VC7, anyway). A couple of the gnu source files were tweaked, but the GnuWin32 source includes these.
I do know that libgsl depends on libgslcblas, so you may have problems only linking libgsl.lib. That should be a link error though, not a crash during execution.
If you could provide a few more details, maybe I can figure out why you're having problems.
Thanks,
Jerry
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Within VisualStudio, go to File->New->Project, then "Visual C++ Projects," then "Win32," then "Win32 Console Application." Enter a name and click "OK." On the next screen click "Finish."
In the "Solution Explorer," right click on the name of your project and go to "Properties."
Under Configuration Properties->Linker->General->Additional Library Directories, type in "C:\Program Files\GnuWin32\lib"
Under Configuration Properties->Linker->Input->Additional Dependencies, type in "libgslcblas.a libgsl.a"
Under Configuration Properties->C/C++->General->Additional Include Directories, type in "C:\Program Files\GnuWin32\include"
Under Configuration Properties->C/C++->Code Generation->Runtime Library,select "Multi-threaded DLL"
I think , u can run it on VC 6.0 now
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello all,
We have a problem. We are trying to use GSL (for calculating eigen values). We have installed the windows version of it. The library gets compiled and linked with the documentation's test program, but the program gives an access violation as soon as any function of the library is called.
Do we have to install some other support libraries, or is there some memory allocation problem? So far we are linking the test program with gsllib.lib only
Looking forward for a kind reply
O.
Hi-
You say the "library gets compiled and linked". Do you mean that you are compiling the gsl library itself, or just that you're trying to link your program against the library? The only libs distributed are a MinGW static lib and dll (with associated import lib). I'd be surprised if you could link against these using VC6. Have you perhaps generated a VC6 import lib for the dll, and the program crashes when run using the MinGW-generated dll? Or, are you compiling the library from source using VC6? If so, did you generate a VC6 project, or are you somehow trying to use the VC7 projects in the distribution?
If you're compiling the library, there aren't too many tricks. One problem others have faced is the use of repeated source file names in different subdirectories. VC7 handles this fine, but earlier versions had problems. It does take a little tweaking to get the config.h right - see the one in the VC7 subdirectory for one that works (with VC7, anyway). A couple of the gnu source files were tweaked, but the GnuWin32 source includes these.
I do know that libgsl depends on libgslcblas, so you may have problems only linking libgsl.lib. That should be a link error though, not a crash during execution.
If you could provide a few more details, maybe I can figure out why you're having problems.
Thanks,
Jerry
Within VisualStudio, go to File->New->Project, then "Visual C++ Projects," then "Win32," then "Win32 Console Application." Enter a name and click "OK." On the next screen click "Finish."
In the "Solution Explorer," right click on the name of your project and go to "Properties."
Under Configuration Properties->Linker->General->Additional Library Directories, type in "C:\Program Files\GnuWin32\lib"
Under Configuration Properties->Linker->Input->Additional Dependencies, type in "libgslcblas.a libgsl.a"
Under Configuration Properties->C/C++->General->Additional Include Directories, type in "C:\Program Files\GnuWin32\include"
Under Configuration Properties->C/C++->Code Generation->Runtime Library,select "Multi-threaded DLL"
I think , u can run it on VC 6.0 now