Page 1 of 1

Unresolved external symbol _pcre_free

Posted: Mon May 29, 2006 05:37
by BradDaBug
I checked out the lastest 0.5 code from svn and installed the version of pcre that's provided from GnuWin32 (http://gnuwin32.sourceforge.net/packages/pcre.htm). When I try to build CEGUI using Visual C++ 2003 I get this error:

unresolved external symbol _pcre_free referenced in function "public: void __thiscall CEGUI::RegexValidator::release(void)"

Has anyone else run across this? Do I have to compile pcre myself?

Posted: Mon May 29, 2006 06:56
by scriptkid
Hi,

there are some issues with compiling Pcre yourselves (mainly caused bu different versions). But you might try this dependency package, which contains a version which seems to work: http://prdownloads.sourceforge.net/cray ... p?download

HTH.

Posted: Mon May 29, 2006 14:45
by BradDaBug
I tried that package, and the pcre thing went away. But now the compiler is complaining about not being able to find stlport_vc7_static.lib. Was it supposed to be in the package? Or can I compile it myself?

Posted: Tue May 30, 2006 09:15
by scriptkid
Ah sorry i should have added the forum topic as well:
http://www.cegui.org.uk/phpBB2/viewtopi ... light=pcre

You have to ignore the stlport_vc7_static.lib in your project's linker options.

Good luck!

Posted: Wed Oct 11, 2006 20:43
by granx
How was PCRE built? Who made the dependency package? Is it magic or is it built like other libraries, with a compiler? :shock:

Posted: Thu Oct 12, 2006 11:07
by lindquist
CE did vc7.1 and I did vc8.0. PCRE is the hardest library to build.

I will share my premake.lua which I personally used. It provides a prebuild option which will fix the config.h stuff, but you still need to generate pcre_chartables.c (check the non-unix readme).

to remove the debug messages look in pcre_internal.h and fix the DPRINTF macro.

HTH

Posted: Fri Apr 03, 2009 08:12
by mrGREEN
I now, it's a very old topic. But I'm interest in building PCRE. I would like to embedded the lib for my project. I'm working on mvs2008.

Posted: Fri Apr 03, 2009 15:10
by Jamarr
You did not specify what, if any, problems you had when trying to build PCRE. Since this topic is 3y old, I doubt it is even remotely close to being relevant.

I built a static-lib version of PCRE (latest version as of 10/2008) without much trouble; I think you just need cmake to create the project files.

Posted: Sun Apr 05, 2009 21:15
by mrGREEN
You are right

Well let me start with the problem that I got when I was trying to build my project. I got this warning with mvs9.0

pcre_d.lib(pcre_chartables.obj) : warning LNK4099: PDB 'vc90.pdb' was not found with

That's why I decide to rebuild pcre. Well, let me find some info about using cmake under windows, since I never used before.

Thanks

EDIT

OK, using CMAKE I was able to rebuild pcre and now I don't have the warning. Thanks

Re: Unresolved external symbol _pcre_free

Posted: Sun Apr 26, 2009 00:19
by lcy03406
Maybe your pcre.lib is not a static lib but an import lib for some pcre.dll. remove /D "PCRE_STATIC" in CEGUI, or recompile pcre with PCRE_STATIC defined.