Search code examples
cpcre

Using pcre in a c program on windows


I am trying to build an appliction based upon the pcredemo application. When I try and compile the application in Windows I get the following compiler errors.

undefined reference to `_imp__pcre_compile'|
undefined reference to `_imp__pcre_exec'|
undefined reference to `_imp__pcre_free'|

Am I missing some .dll files or something?


Solution

  • Those are linker errors. You need to make sure that you are passing the PCRE .lib files to the linker. Another possible problem could be that your compiler/linker is using a different .lib file format from that used to build the PCRE .lib files.