Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <confuse.h>
- #include "core.h"
- #include "readconfig.h"
- int read_config_file(const char * filename, struct damterm_socket *dt_sock){
- cfg_t *cfg;
- cfg_opt_t socket_opts[] = {
- CFG_STR("destination_ip", IP_ADDR_DEFAULT, CFGF_NONE),
- CFG_INT("port", PORT_DEFAULT, CFGF_NONE),
- CFG_END()
- };
- cfg = cfg_init(socket_opts, CFGF_NONE);
- if(cfg_parse(cfg, filename) == CFG_PARSE_ERROR)
- printf("Błąd parsowania pliku!n");
- else if(cfg_parse(cfg, filename) == CFG_FILE_ERROR)
- printf("Bład odczytu plikun"); //!TODO check existing of the file if not create new one.
- return -1; //!TODO Do nothing, return error.
- }
- readconfig.c:(.text+0x68): undefined reference to `cfg_init'
- readconfig.c:(.text+0x78): undefined reference to `cfg_parse'
- readconfig.c:(.text+0x8c): undefined reference to `cfg_parse'
- Libraries have been installed in:
- /usr/local/lib
- If you ever happen to want to link against installed libraries
- in a given directory, LIBDIR, you must either use libtool, and
- specify the full pathname of the library, or use the '-LLIBDIR'
- flag during linking and do at least one of the following:
- - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
- during execution
- - add LIBDIR to the 'LD_RUN_PATH' environment variable
- during linking
- - use the '-Wl,-rpath -Wl,LIBDIR' linker flag
- - have your system administrator add LIBDIR to '/etc/ld.so.conf'
- ls -l /usr/local/lib/libconfuse.so
- lrwxrwxrwx 1 root root 19 05-31 13:22 /usr/local/lib/libconfuse.so -> libconfuse.so.1.0.0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement