Created
January 28, 2013 04:16
-
-
Save ntmoe/4652970 to your computer and use it in GitHub Desktop.
Minimal example to get warnings about gsl_vector_get and gsl_vector_set when building freesteam-2.1 on OS X 10.8.2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <gsl/gsl_vector.h> | |
| static int region1_f(const gsl_vector *x); | |
| int main (void) | |
| { | |
| gsl_vector * x = gsl_vector_alloc (3); | |
| int i; | |
| for (i = 0; i < 3; i++) | |
| { | |
| gsl_vector_set (x, i, 1.234 + i); | |
| } | |
| region1_f(x); | |
| return 0; | |
| } | |
| static int region1_f(const gsl_vector *x){ | |
| double p = gsl_vector_get(x,0); | |
| double T = gsl_vector_get(x,1); | |
| printf("%f\n", p); | |
| printf("%f\n", T); | |
| return GSL_SUCCESS; | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There are no messages to stdout when using
$ gcc main.c -o gsl_testpkg-config gsl --libs --cflags``but I get the warnings when I do this, which is taken from the command executed by
scons:... and the program runs fine: