Hi Tim, there are two problems in your code:
1. You have to add the lines #include <stdio.h> #include <gsl/gsl_randist.h> to the beginning of your program. The header files "stdio.h" and "gsl/gsl_randist.h" contain declarations of the functions you use (printf, gsl_ran_choose). Without this information, the compiler complains about the "implicit declaration", i.e., the appearance of a function without a proper declaration. Additionally, you have to tell the linker where to find the actual code of the functions. In order to do this, you have to add '-lgsl -lgslcblas -lm' to the gcc command line, e.g. gcc test.c -lgsl -lgslcblas -lm 2. The compiler issues a warning about your incorrect use of gsl_ran_choose. Indeed, the first argument to this function should be of type gsl_rng *, not int, see http://www.gnu.org/software/gsl/manual/html_node/Shuffling-and-Sampling.html Maybe you should read the chapter http://www.gnu.org/software/gsl/manual/html_node/Using-the-library.html in the manual and have a look at some example programs in the documentation to get familiar with GSL programming. Regards, Frank _______________________________________________ Help-gsl mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-gsl
