Hallo Zusammen,
ich habe mir eine kleine Funktiongebastelt, die einen hübschen 2D Plot
macht.
1 | int plot(char *col, char *dfile, char *gfile)
|
2 | {
|
3 |
|
4 | FILE *pipe = popen("gnuplot -persist","w");
|
5 | fprintf(pipe, "set term png\n");
|
6 | fprintf(pipe, "set output '%s'\n", gfile);
|
7 | fprintf(pipe, "set pm3d map\n");
|
8 | fprintf(pipe, "set size ratio 1\n");
|
9 | fprintf(pipe, "set xrange [0:%i]\n", xdim-1);
|
10 | fprintf(pipe, "set yrange [0:%i]\n", ydim-1);
|
11 | fprintf(pipe, "set xtics 0\n");
|
12 | fprintf(pipe, "set ytics 0\n");
|
13 | fprintf(pipe, "set palette model %s\n", col);
|
14 | fprintf(pipe, "unset colorbox\n");
|
15 | fprintf(pipe, "splot '%s' matrix using 1:2:3 notitle", dfile);
|
16 |
|
17 | pclose(pipe);
|
18 | return 0;
|
19 | }
|
Das Problem ist es funktioniert einwandfrei ich bekomme aber trotzdem
ständig Warnungen obwohl ich die stdio.h eingebunden habe. Weiß jemand
warum?
warning: implicit declaration of function ‘popen’
warning: assignment makes pointer from integer without a cast
warning: implicit declaration of function ‘pclose’
Zweite Frage auf meinem Linux läuft das tadellos aber kann man das auch
auf Windows exportieren?
Gruß