Undefined reference to _regcmp and _regex

Corinna Vinschen corinna-cygwin@cygwin.com
Wed Nov 21 15:02:00 GMT 2007

On Nov 21 17:42, Anik Pal wrote:
> Hello All,
> I was porting my application code to windows from solaris  environment using
> cygwin, while compiling goes ok at linking phase I get the following error. 
> /home/Administrator/glds/build/Sgl/tables.c:1744: undefined reference to
> `_regcmp'
> /home/Administrator/glds/build/Sgl/tables.c:1757: undefined reference to
> `_regex'
> Where to get related libraries  for "_regcmp" and "_regex" can anyone tell
> me?

I have no idea.  regcmp/regex are very old functions for regular
expression handling, back from the System III days.  These functions
have been superseded at least three times.  The current implementation
is the POSIX functionality as described on


This is also implemented in Cygwin.  If you need portable regexp
handling, consider to port your application to the POSIX variant.


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

More information about the Cygwin mailing list