Advertisement
Guest User

Untitled

a guest
May 31st, 2016
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.58 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <confuse.h>
  3.  
  4. #include "core.h"
  5. #include "readconfig.h"
  6.  
  7. int read_config_file(const char * filename, struct damterm_socket *dt_sock){
  8.  
  9. cfg_t *cfg;
  10.  
  11. cfg_opt_t socket_opts[] = {
  12. CFG_STR("destination_ip", IP_ADDR_DEFAULT, CFGF_NONE),
  13. CFG_INT("port", PORT_DEFAULT, CFGF_NONE),
  14. CFG_END()
  15. };
  16. cfg = cfg_init(socket_opts, CFGF_NONE);
  17. if(cfg_parse(cfg, filename) == CFG_PARSE_ERROR)
  18. printf("Błąd parsowania pliku!n");
  19. else if(cfg_parse(cfg, filename) == CFG_FILE_ERROR)
  20. printf("Bład odczytu plikun"); //!TODO check existing of the file if not create new one.
  21.  
  22.  
  23. return -1; //!TODO Do nothing, return error.
  24. }
  25.  
  26. readconfig.c:(.text+0x68): undefined reference to `cfg_init'
  27. readconfig.c:(.text+0x78): undefined reference to `cfg_parse'
  28. readconfig.c:(.text+0x8c): undefined reference to `cfg_parse'
  29.  
  30. Libraries have been installed in:
  31. /usr/local/lib
  32.  
  33. If you ever happen to want to link against installed libraries
  34. in a given directory, LIBDIR, you must either use libtool, and
  35. specify the full pathname of the library, or use the '-LLIBDIR'
  36. flag during linking and do at least one of the following:
  37. - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
  38. during execution
  39. - add LIBDIR to the 'LD_RUN_PATH' environment variable
  40. during linking
  41. - use the '-Wl,-rpath -Wl,LIBDIR' linker flag
  42. - have your system administrator add LIBDIR to '/etc/ld.so.conf'
  43.  
  44. ls -l /usr/local/lib/libconfuse.so
  45. 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