Hi, I wanted to build PCRE from scratch so that I knew what compile options were being used. I am working on Windows with Visual Studio and I found the PCRE doesn't have an official build solution for this compiler. However, they have some user contributions and I found this one quite helpful.
So, with PCRE finally built with MSVC, I tried to build CEGUI's SVN trunk, which is from last week sometime. I made sure the CEGUIBase project file would locate the dependencies' headers/libraries. I get this error upon linking CEGUIBase, release build:
unresolved external symbol _pcre_free referenced in function "public: void __thiscall CEGUI::RegexValidator::release(void)" (?release@RegexValidator@CEGUI@@QAEXXZ)
I looked for that 'pcre_free' symbol in the PCRE source code (pcre.h), and it is defined differently for builds that have the preprocessor macro "VPCOMPAT" defined, which appears to be for the Virtual Pascal support. Why am I seeing this link error when building CEGUI? Does it make sense to just add this preprocessor and rebuild PCRE?
Building PCRE on windows.
Moderators: CEGUI MVP, CEGUI Team
OK I fixed it.
First off, when building PCRE with the MSVC project files I mentioned, you need to add these preprocessor defines:
PCRE_DEFINITION
DLL_EXPORT
I believe '_WIN32; is already listed, but make sure it's in there too.
Next, when building CEGUI against PCRE, '_WIN32' must be defined, and 'PCRE_STATIC' must NOT be defined.
Actually, I just embarrassed myself. I realized all this work was for using PCRE as a DLL rather than a static library. The project files I found were building a DLL, which is probably most common, but CEGUI wants a static library built, so you'll need to tweak those project settings...well, that's what you'll need if you want to do the same. Sorry for the inconvenience.
First off, when building PCRE with the MSVC project files I mentioned, you need to add these preprocessor defines:
PCRE_DEFINITION
DLL_EXPORT
I believe '_WIN32; is already listed, but make sure it's in there too.
Next, when building CEGUI against PCRE, '_WIN32' must be defined, and 'PCRE_STATIC' must NOT be defined.
Actually, I just embarrassed myself. I realized all this work was for using PCRE as a DLL rather than a static library. The project files I found were building a DLL, which is probably most common, but CEGUI wants a static library built, so you'll need to tweak those project settings...well, that's what you'll need if you want to do the same. Sorry for the inconvenience.
- lindquist
- CEGUI Team (Retired)
- Posts: 770
- Joined: Mon Jan 24, 2005 21:20
- Location: Copenhagen, Denmark
I just posted here:
http://www.cegui.org.uk/phpBB2/viewtopi ... =9583#9583
http://www.cegui.org.uk/phpBB2/viewtopi ... =9583#9583
Who is online
Users browsing this forum: No registered users and 15 guests