undefined reference to regex function
Posted: Wed Sep 12, 2018 12:57 pm
Hi everyone,
I'm trying to use regex.h library but get linker errors:
I suppose that appropriate c-files are missed but if this true why regex.h still exist?
I'm trying to use regex.h library but get linker errors:
Code: Select all
/home/gost/esp/ups_motinor/build/main/libmain.a(app_main.o):(.literal.app_main+0x70): undefined reference to `regcomp'
/home/gost/esp/ups_motinor/build/main/libmain.a(app_main.o):(.literal.app_main+0x74): undefined reference to `regexec'
/home/gost/esp/ups_motinor/build/main/libmain.a(app_main.o):(.literal.app_main+0x78): undefined reference to `regfree'
/home/gost/esp/ups_motinor/build/main/libmain.a(app_main.o): In function `app_main':
/home/gost/esp/ups_motinor/main/app_main.cpp:209: undefined reference to `regcomp'
/home/gost/esp/ups_motinor/main/app_main.cpp:216: undefined reference to `regexec'
/home/gost/esp/ups_motinor/main/app_main.cpp:229: undefined reference to `regfree'
collect2: error: ld returned 1 exit status