| 50 |
<pre> |
<pre> |
| 51 |
gcc -o pcredemo -I/usr/local/include pcredemo.c -L/usr/local/lib -lpcre |
gcc -o pcredemo -I/usr/local/include pcredemo.c -L/usr/local/lib -lpcre |
| 52 |
</pre> |
</pre> |
| 53 |
Once you have compiled the demonstration program, you can run simple tests like |
In a Windows environment, if you want to statically link the program against a |
| 54 |
this: |
non-dll <b>pcre.a</b> file, you must uncomment the line that defines PCRE_STATIC |
| 55 |
|
before including <b>pcre.h</b>, because otherwise the <b>pcre_malloc()</b> and |
| 56 |
|
<b>pcre_free()</b> exported functions will be declared |
| 57 |
|
<b>__declspec(dllimport)</b>, with unwanted results. |
| 58 |
|
</P> |
| 59 |
|
<P> |
| 60 |
|
Once you have compiled and linked the demonstration program, you can run simple |
| 61 |
|
tests like this: |
| 62 |
<pre> |
<pre> |
| 63 |
./pcredemo 'cat|dog' 'the cat sat on the mat' |
./pcredemo 'cat|dog' 'the cat sat on the mat' |
| 64 |
./pcredemo -g 'cat|dog' 'the dog sat on the cat' |
./pcredemo -g 'cat|dog' 'the dog sat on the cat' |
| 100 |
REVISION |
REVISION |
| 101 |
</b><br> |
</b><br> |
| 102 |
<P> |
<P> |
| 103 |
Last updated: 30 September 2009 |
Last updated: 26 May 2010 |
| 104 |
<br> |
<br> |
| 105 |
Copyright © 1997-2009 University of Cambridge. |
Copyright © 1997-2010 University of Cambridge. |
| 106 |
<br> |
<br> |
| 107 |
<p> |
<p> |
| 108 |
Return to the <a href="index.html">PCRE index page</a>. |
Return to the <a href="index.html">PCRE index page</a>. |