This is main.c
file I am trying to work with influxdb
library I hope I installed it clearly with my knowledge here are the screen shots of library
This is linked library
This is the path of the library
This is the code file
#include <influxdb/influxdb.h>
int main() {
int status;
s_influxdb_client *client = influxdb_client_new("xxxxxxxxxx", "influxdb", "xxxxxxxxxxxxxx", "", 0);
status = influxdb_create_database(client, "toto");
influxdb_client_free(client);
return status != 201;
}
This is how I executing the command in gcc to compile and run
gcc -I/usr/local/include/ -L/usr/local/lib -linfluxdb -o john john.c
Even though I included the library it raising undefined reference This is what my error is
/tmp/cce9K1Kh.o: In function `main':
john.c:(.text+0x23): undefined reference to `influxdb_client_new'
john.c:(.text+0x38): undefined reference to `influxdb_create_database'
john.c:(.text+0x47): undefined reference to `influxdb_client_free'
collect2: error: ld returned 1 exit status
This is where I found library and Followed the instructions in Read Me
file Everything is performed smooth Influxdb
Please let me know if you need more information