diff options
-rw-r--r-- | Makefile | 3 | ||||
-rw-r--r-- | remote_plot.c | 4 |
2 files changed, 5 insertions, 2 deletions
@@ -9,7 +9,8 @@ remote_plot.o: remote_plot.c cc -Wall $$(pkg-config --cflags --libs libssh plplot gtk4) -lm -c $< remote_plot: list.o remote_plot.o - cc -Wall $$(pkg-config --cflags --libs libssh plplot gtk4) -lm -o $@ $^ +# raspberry pi debian 12 make error `ld: undefined reference to ...` if use `cc -Wall $$(pkg-config --cflags --libs libssh plplot gtk4) -lm -o $@ $^`. No error if move $^ to the beginning. Not sure why, maybe becuase pi has an old version of gcc? + cc $^ -Wall $$(pkg-config --cflags --libs libssh plplot gtk4) -lm -o $@ clean: rm -f remote_plot remote_plot.o list.o diff --git a/remote_plot.c b/remote_plot.c index b86dd3f..c6c847f 100644 --- a/remote_plot.c +++ b/remote_plot.c @@ -275,7 +275,9 @@ static gboolean read_data(gpointer user_data) // This is to represent a loop over time // Let's try a random walk process - file = sftp_open(data->sftp, sftp_expand_path(data->sftp,"~/.local/share/mycan.csv"), access_type, 0); + // old libssh seems does not have sftp_expand_path + //file = sftp_open(data->sftp, sftp_expand_path(data->sftp,"~/.local/share/mycan.csv"), access_type, 0); + file = sftp_open(data->sftp, "/home/Spartan_Racing_Charger/.local/share/mycan.csv", access_type, 0); if (file == NULL) { fprintf(stderr, "Can't open file for reading: %s\n", ssh_get_error(data->session)); |