Hio, Am Freitag 28 Mai 2010 13:15:46 schrieb gottstew: > I copied that example (saved as test_ode.c) and it compiled properly > (using "gcc -Wall -c test_ode.c") and I got the test_ode.o file as > expected.
The file test_ode.o is not the final executable file, but only an intermediate result. To get an executable file and run it, you can either 1. Run the following commands: gcc -Wall -c test_ode.c (like you did) gcc -o test_ode test_ode.o -lgsl -lgslcblas -lm The 2nd command calls the so-called linker and produces the executable file test_ode which you can run with ./test_ode 2. A bit simpler: Run only the command gcc -o test_ode test_ode.c -lgsl -lgslcblas -lm This produces the executable file test_ode directly. You need the first version (which looks a bit more complicated at first sight) if your source code is split between different files. You can find these steps in the manual: http://www.gnu.org/software/gsl/manual/html_node/Compiling-and-Linking.html http://www.gnu.org/software/gsl/manual/html_node/Linking-programs-with-the- library.html Cheers, Frank _______________________________________________ Help-gsl mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-gsl
