|
|
Home » U++ Library support » U++ Library : Other (not classified elsewhere) » pregexp isn't compiling complaining about undefined symbols
pregexp isn't compiling complaining about undefined symbols [message #21071] |
Fri, 01 May 2009 01:25 |
mingodad
Messages: 53 Registered: February 2008 Location: Spain
|
Member |
|
|
I've got the latest ultimate++ and tried to use the plugin/pcre but it doesn't work it compiles but when linking complain about undefined _imp_pcre_free, _imp_pcre_exec, ...
I managed to get it working although in a not usual way.
#ifndef _plugin_pcre_pcre_h_
#define _plugin_pcre_pcre_h_
#include <Core/Core.h>
#define PCRE_EXP_DECL extern <======== adding this line
//before include pcre headers
#include "lib/pcre.h"
NAMESPACE_UPP
#include "RegExp.h"
END_UPP_NAMESPACE
#endif
Also added one more function to it:
void RegExp::GetMatchPos(int i, int& iPosStart, int& iPosAfterEnd)
{
i = 2 * (i + 1);
iPosStart = pos[i];
iPosAfterEnd = pos[i + 1];
}
|
|
|
|
|
|
|
Re: pregexp isn't compiling complaining about undefined symbols [message #30483 is a reply to message #21071] |
Tue, 04 January 2011 15:03 |
linuxeasy
Messages: 1 Registered: January 2011 Location: Mumbai, India
|
Junior Member |
|
|
Thanks for the info domingoad,
Actually i came across this thread while searching for the solution of the same _imp_pcre_free, _imp_pcre_malloc kind errors, and your solution worked for me.
Though my work wasn't related to ultimate++ but i was trying to compile a cppcms and was getting stuck at this error.
just for anyone who reaches here for the same error, the changes to be made in the file of cppcms is here:
cppcms-0.99.5\booster\lib\regex\src\pcre_regex.cpp
#define BOOSTER_SOURCE
#include <booster/regex.h>
#include <string.h>
#define PCRE_EXP_DECL extern // <--- this is the addition.
#include <pcre.h>
This is probably a general error that can be encountered while compiling anything that requires pcre library on windows.
once again thanks a lot for your help.
|
|
|
Goto Forum:
Current Time: Tue Apr 23 08:33:54 CEST 2024
Total time taken to generate the page: 0.02571 seconds
|
|
|