PCRE Linker error

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

Pint0 Xtreme
Just popping in
Just popping in
Posts: 7
Joined: Sat Sep 17, 2011 07:03

PCRE Linker error

Postby Pint0 Xtreme » Sat Jan 28, 2012 04:58

Hey there,

I'm trying to rebuild CEGUIBase and I've included the PCRE, Freetype2 and ZLIB libraries. However, I get the following linker error:

Code: Select all

1>CEGUIPCRERegexMatcher.obj : error LNK2019: unresolved external symbol _pcre_free referenced in function "private: void __thiscall CEGUI::PCRERegexMatcher::release(void)" (?release@PCRERegexMatcher@CEGUI@@AAEXXZ)


Am I using an incorrect version of the PCRE libraries? What am I missing?

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: PCRE Linker error

Postby CrazyEddie » Sat Jan 28, 2012 08:20

What am I missing?

I don't know what you're missing, but I can tell you that this post is missing a lot of information. While the content that might be needed here may not be explicitly covered, please follow the 'spirit' of the guidelines and include as much pertinent information as possible (version numbers, compiler information, build configurations and so on, and so forth).

At a guess, I would say you're passing to the linker a pcre.lib that pertains to a DLL, whereas from the error, I think it's expecting a static archive.

CE

Pint0 Xtreme
Just popping in
Just popping in
Posts: 7
Joined: Sat Sep 17, 2011 07:03

Re: PCRE Linker error

Postby Pint0 Xtreme » Sat Jan 28, 2012 09:09

CrazyEddie wrote:
What am I missing?

I don't know what you're missing, but I can tell you that this post is missing a lot of information. While the content that might be needed here may not be explicitly covered, please follow the 'spirit' of the guidelines and include as much pertinent information as possible (version numbers, compiler information, build configurations and so on, and so forth).

At a guess, I would say you're passing to the linker a pcre.lib that pertains to a DLL, whereas from the error, I think it's expecting a static archive.

CE


I apologize. I'm using the latest stable build of CEGUI along with PCRE 7.0. I'm compiling on Visual Studio 2008 C++ Express and this occurs on the release and debug build configurations. I'm not sure whatever pertinent information I'm missing.

In the CEGUIPCRERegexMatcher.cpp file, I replaced

Code: Select all

pcre_free(d_regex);
with

Code: Select all

free(d_regex);

And that seemed to have "fixed" the linker issue though I'm unclear what complications are by not using the pcre_free function to clear the memory.

But you're probably right. I'm passing the linker a pcre.lib.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 13 guests