Open sillysloft opened 19 years ago
Original comment by: akir
Logged In: YES user_id=1101187
try to compile: --------------------------------------- #include <stdio.h> #include <regex.h> #include <sys/types.h> int main() { regfree(NULL); return 0; } ---------------------------------------
with : gcc file.cc
link error?
Original comment by: akir
Logged In: YES user_id=721641
Yes, similar kind of error:
madmax@bluelight ~$ gcc file.cc /tmp/ccWeKoUc.o(.text+0x16): In function `main': : undefined reference to `regfree(re_pattern_buffer*)' /tmp/ccWeKoUc.o(.eh_frame+0x11): undefined reference to `__gxx_personality_v0' collect2: ld returned 1 exit status
What's wrong?
Original comment by: madmaxjr
Original comment by: akir
Logged In: YES user_id=1101187
you have to ask the slackware-guys, in which libs regfree is in slackware10.
on my gentoo regfree and co are part of the glibc:
$> nm fluxbox | grep reg U regcomp@@GLIBC_2.0 U regerror@@GLIBC_2.0 U regexec@@GLIBC_2.3.4 U regfree@@GLIBC_2.0
on my freebsd they are part of libc:
$> man regfree NAME regcomp, regexec, regerror, regfree -- regular-expression library
LIBRARY Standard C Library (libc, -lc)
so, either ask the slackware guys or try this link:
http://www.neologik.hu/pipermail/changedfiles/2003-December/000007.html
same problem described there.
Original comment by: akir
Latest checkout from svn doesn't compile. I'm getting the following error:
RegExp.o(.text+0xab): In function `RegExp::RegExp[not-in-charge](std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)': /usr/include/c++/3.3.4/bits/basic_string.h:717: undefined reference to `regcomp(re_pattern_buffer*, char const*, int)' RegExp.o(.text+0xf8): In function `RegExp::RegExp[not-in-charge](std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)': /home/madmax/src/fluxbox/src/RegExp.cc:63: undefined reference to `regerror(int, re_pattern_buffer const*, char*, unsigned)' RegExp.o(.text+0x111):/home/madmax/src/fluxbox/src/RegExp.cc:66: undefined reference to `regerror(int, re_pattern_buffer const*, char*, unsigned)' RegExp.o(.text+0x29b): In function `RegExp::RegExp[in-charge](std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)': /usr/include/c++/3.3.4/bits/basic_string.h:717: undefined reference to `regcomp(re_pattern_buffer*, char const*, int)' RegExp.o(.text+0x2e8): In function `RegExp::RegExp[in-charge](std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)': /home/madmax/src/fluxbox/src/RegExp.cc:63: undefined reference to `regerror(int, re_pattern_buffer const*, char*, unsigned)' RegExp.o(.text+0x301):/home/madmax/src/fluxbox/src/RegExp.cc:66: undefined reference to `regerror(int, re_pattern_buffer const*, char*, unsigned)' RegExp.o(.text+0x415): In function `RegExp::~RegExp [not-in-charge]()': /home/madmax/src/fluxbox/src/RegExp.cc:80: undefined reference to `regfree(re_pattern_buffer*)' RegExp.o(.text+0x475): In function `RegExp::~RegExp [in-charge]()': /home/madmax/src/fluxbox/src/RegExp.cc:80: undefined reference to `regfree(re_pattern_buffer*)' RegExp.o(.text+0x4ba): In function `RegExp::~RegExp [in-charge deleting]()': /home/madmax/src/fluxbox/src/RegExp.cc:80: undefined reference to `regfree(re_pattern_buffer*)' RegExp.o(.text+0x52e): In function `RegExp::match(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const': /usr/include/c++/3.3.4/bits/basic_string.h:717: undefined reference to `regexec(re_pattern_buffer const*, char const*, unsigned, regmatch_t*, int)' collect2: ld returned 1 exit status make[4]: *** [fluxbox] Error 1 make[4]: Leaving directory `/home/madmax/src/fluxbox/src' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/home/madmax/src/fluxbox/src' make[2]: *** [all] Error 2 make[2]: Leaving directory `/home/madmax/src/fluxbox/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/madmax/src/fluxbox' make: *** [all] Error 2
Using Slackware 10.0, gcc 3.3.4
Reported by: madmaxjr