Read and respond to this message at: https://sourceforge.net/forum/message.php?msg_id=3663277 By: udo390
Hi, I am trying to run GSL 1.6 under VC 7.1. Most of the examples from the GSL manual work just fine, but some (naturally the ones I need) crash. Below is the example from Section 30.4 on Wavelet Transforms that crashes with "test.exe has encountered a problem and needs to close. We are sorry for the inconvenience." I compile and link as follows (there are no errors while compiling or linking): cl /c /DGSL_DLL /I "C:\Program Files\GnuWin32\include" test.c link /LIBPATH:"C:\Program Files\GnuWin32\lib" test.obj libgsl.lib Here is the error signature: AppName: test.exe AppVer: 0.0.0.0 ModName: libgsl.dll ModVer: 0.0.0.0 Offset: 000a7ece Any suggestions would be more than welcome. Thanks!!! Ulrich test.c contains: #include <stdio.h> #include <math.h> #include <gsl/gsl_sort.h> #include <gsl/gsl_wavelet.h> int main (int argc, char **argv) { int i, n = 256, nc = 20; double *data = malloc (n * sizeof (double)); double *abscoeff = malloc (n * sizeof (double)); size_t *p = malloc (n * sizeof (size_t)); FILE *f = fopen (argv[1], "r"); for (i = 0; i < n; i++) { fscanf (f, "%lg", &data[i]); } fclose (f); { gsl_wavelet *w = gsl_wavelet_alloc (gsl_wavelet_daubechies, 4); gsl_wavelet_workspace *work = gsl_wavelet_workspace_alloc (n); gsl_wavelet_transform_forward (w, data, 1, n, work); for (i = 0; i < n; i++) { abscoeff[i] = fabs (data[i]); } gsl_sort_index (p, abscoeff, 1, n); for (i = 0; (i + nc) < n; i++) data[p[i]] = 0; gsl_wavelet_transform_inverse (w, data, 1, n, work); } for (i = 0; i < n; i++) { printf ("%g\n", data[i]); } } ______________________________________________________________________ You are receiving this email because you elected to monitor this forum. To stop monitoring this forum, login to SourceForge.net and visit: https://sourceforge.net/forum/unmonitor.php?forum_id=74807 ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ GnuWin32-Users mailing list GnuWin32-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnuwin32-users