Re: [pcre-dev] PCRE demonstration program

Página superior
Eliminar este mensaje
Autor: Philip Hazel
Fecha:  
A: Rafael Fernández López
Cc: pcre-dev
Asunto: Re: [pcre-dev] PCRE demonstration program
On Sat, 21 Nov 2009, Rafael Fern?ndez L?pez wrote:

> ---
> In Unix-like environments, compile this program thuswise:
>
>   gcc -Wall pcredemo.c -I/usr/local/include -L/usr/local/lib \
>     -R/usr/local/lib -lpcre

>
> Replace "/usr/local/include" and "/usr/local/lib" with wherever the include and
> library files for PCRE are installed on your system. You don't need -I and -L
> if PCRE is installed in the standard system libraries. Only some operating
> systems (e.g. Solaris) use the -R option.
> ---
>
> It is far easier (and less confusing) to use pkg-config:
>
> ---
> gcc -Wall pcredemo.c `pkg-config --cflags --libs libpcre` -o pcredemo
> ---


Yes, that is better, as long as PCRE has been installed in the standard
manner. The program was written before PCRE had pkg-config support,
and it never got updated. When I next work on PCRE, I will add the
suggestion that pkg-config is the easiset way to compile it, as long as
pkg-config is available.

Thank you for your comment.

Philip

--
Philip Hazel