[Pcre-svn] [477] code/trunk/pcredemo.c: Add comments to pcre…

Página Inicial
Delete this message
Autor: Subversion repository
Data:  
Para: pcre-svn
Assunto: [Pcre-svn] [477] code/trunk/pcredemo.c: Add comments to pcredemo about compiling by using pkg-config.
Revision: 477
          http://vcs.pcre.org/viewvc?view=rev&revision=477
Author:   ph10
Date:     2010-01-03 15:53:09 +0000 (Sun, 03 Jan 2010)


Log Message:
-----------
Add comments to pcredemo about compiling by using pkg-config.

Modified Paths:
--------------
    code/trunk/pcredemo.c


Modified: code/trunk/pcredemo.c
===================================================================
--- code/trunk/pcredemo.c    2010-01-03 15:37:24 UTC (rev 476)
+++ code/trunk/pcredemo.c    2010-01-03 15:53:09 UTC (rev 477)
@@ -7,14 +7,24 @@
 pcresample documentation for a short discussion ("man pcresample" if you have
 the PCRE man pages installed).


-In Unix-like environments, compile this program thuswise:
+In Unix-like environments, if PCRE is installed in your standard system
+libraries, you should be able to compile this program using this command:

-  gcc -Wall pcredemo.c -I/usr/local/include -L/usr/local/lib \
-    -R/usr/local/lib -lpcre
+gcc -Wall pcredemo.c -lpcre -o pcredemo


+If PCRE is not installed in a standard place, it is likely to be installed with
+support for the pkg-config mechanism. If you have pkg-config, you can compile
+this program using this command:
+
+gcc -Wall pcredemo.c `pkg-config --cflags --libs libpcre` -o pcredemo
+
+If you do not have pkg-config, you may have to use this:
+
+gcc -Wall pcredemo.c -I/usr/local/include -L/usr/local/lib \
+ -R/usr/local/lib -lpcre -o pcredemo
+
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
+library files for PCRE are installed on your system. Only some operating
systems (e.g. Solaris) use the -R option.

Building under Windows: