Dunc
Dunc

Reputation: 8038

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?

Upvotes: 0

Views: 532

Answers (2)

BugSquasher
BugSquasher

Reputation: 335

If you are linking PCRE statically, you need to #define PCRE_STATIC before compiling.

Upvotes: 0

David Heffernan
David Heffernan

Reputation: 612884

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.

Upvotes: 1

Related Questions