title: How do I deal with "undefined reference to `regcomp'" error
body: <p>I'm new to Eclipse environment and I'm trying to write a C program in Eclipse installed in Windows 10. Compiler I use is MinGW latest version installed through MSYS2. The program I've written has got regular expressions used in it. When I try to build the code, I get the following errors-</p>
  
  <p>21: undefined reference to <code>regcomp'
  35: undefined reference to</code>regexec'
  <a href="https://i.stack.imgur.com/AZdK4.png" rel="nofollow noreferrer">enter image description here</a></p>
  
  <p>Can anyone help me resolve this issue??</p>