Re: [pcre-dev] Calculated match recursion stack size

Startseite
Nachricht löschen
Autor: Graycode
Datum:  
To: pcre-dev
Betreff: Re: [pcre-dev] Calculated match recursion stack size
On Sat, 21 Jan 2012, Philip Hazel wrote:

> > pcretest.exe : fatal error LNK1120: 3 unresolved externals
> >
> > It turns out that pcretest also needed to be linked with pcre_tables.
>
> Thanks for the note, but I don't understand the problem, because
> pcre_tables should be linked as part of the PCRE library which you link
> pcretest with.
>
> > Unless I did something wrong in my hand-crafted build, mention of that
> > may be needed in the NON-UNIX-USE document.
>
> Perhaps you left pcre_tables out of the library build?


Sorry, I should have clarified that I'm building the PCRE library as
a Windows DLL. Pcre_tables was one of the things that went into it.
Building a DLL produces a ".lib", but it's about 8K containing only
a list of the exported items (functions and data vectors) that are
externally accessible by programs using the DLL. PCRE functions or
data declared with "PCRE_EXP_DECL" get exported and so are mentioned
in that ".lib".

When linking pcretest to a Windows DLL version of PCRE the tables are
unresolved unless a compilation of pcre_tables is provided because
the DLL's ".lib" has no mention of them.

When doing a static build (vs. DLL) then the ".lib" would be much
larger and the linker could indeed find the tables in there.


> I've ended up with a pretty small patch, so I think it's OK to leave it
> in.


Woo Hoo, that's great news.


Regards,
Graycode