On Fri, 11 Jan 2008, Sheri wrote:
> Any thoughts on the failure of pcredemo to build properly using
> configure and make?
>
> > When configured with Configure for Static libraries in Msys, pcregrep is
> > created ok, but pcredemo is problematic. Pcredemo is not even included
> > at all in Cmake.
In the "old days" before automake and CMake, pcredemo was not built with
PCRE. I provided it as a demonstration program for people to build
themselves, as users of PCRE. When it was included in the automake
build, I didn't object (other things to worry about, life's too short,
etc, etc). Needless to say, it builds OK on Linux.
> > pcredemo.o:pcredemo.c:(.text+0xca): undefined reference to
> > `_imp__pcre_compile'
> > pcredemo.o:pcredemo.c:(.text+0x120): undefined reference to
> > `_imp__pcre_exec'
> > pcredemo.o:pcredemo.c:(.text+0x1b9): undefined reference to
> > `_imp__pcre_fullinfo'
> > pcredemo.o:pcredemo.c:(.text+0x208): undefined reference to
> > `_imp__pcre_fullinfo'
> > pcredemo.o:pcredemo.c:(.text+0x225): undefined reference to
> > `_imp__pcre_fullinfo'
> > pcredemo.o:pcredemo.c:(.text+0x311): undefined reference to
> > `_imp__pcre_exec'
> > pcredemo.o:pcredemo.c:(.text+0x44b): undefined reference to
> > `_imp__pcre_free'
> > pcredemo.o:pcredemo.c:(.text+0x4f1): undefined reference to
> > `_imp__pcre_free'
Looks like it couldn't find any of the PCRE functions, but why that
should be, I don't know. Hmm... there is a difference in the way they
are defined in the automake input:
bin_PROGRAMS += pcregrep
pcregrep_SOURCES = pcregrep.c
pcregrep_LDADD = libpcreposix.la
noinst_PROGRAMS += pcredemo
pcredemo_SOURCES = pcredemo.c
pcredemo_LDADD = libpcre.la
Notice the different libraries. I wonder if that makes a difference?
Neither of them actually uses the POSIX functions.
Philip
--
Philip Hazel