Wednesday 20 March 2019

In function `readConfig' | undefined reference to `config_read_file' | undefined reference to `config_destroy'

/tmp/cctmoy8d.o: In function `readConfig':
readConf.c:(.text+0x1c): undefined reference to `config_init'
readConf.c:(.text+0x2f): undefined reference to `config_read_file'
readConf.c:(.text+0x74): undefined reference to `config_destroy'
collect2: error: ld returned 1 exit status

Compile with  -lconfig

gcc -o main main.c readConf.c -lconfig

No comments:

Post a Comment