undefined reference to regex function

User avatar
gost.404
Posts: 19
Joined: Sat Jul 01, 2017 5:48 pm

undefined reference to regex function

Postby gost.404 » Wed Sep 12, 2018 12:57 pm

Hi everyone,
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
I suppose that appropriate c-files are missed but if this true why regex.h still exist?

SpenZerX
Posts: 16
Joined: Sun Dec 13, 2015 9:23 am

Re: undefined reference to regex function

Postby SpenZerX » Tue Nov 06, 2018 4:11 pm

Any news here? I have the same problem. Can i use regex?
Creator of Smart Connected Devices - for EcSUHA.de Project

Who is online

Users browsing this forum: Bing [Bot] and 412 guests