Re: [pcre-dev] [Bulk] pcre 7.8 pcrecpp linking problem

Kezdőlap
Üzenet törlése
Szerző: s2ilveszter
Dátum:  
Címzett: pcre-dev
Tárgy: Re: [pcre-dev] [Bulk] pcre 7.8 pcrecpp linking problem
Dear Philip Hazel and Developers!

I had a big luck, I do not know why this works, but works.
I started msys,
    cd /local/bin
    pcre-config --libs
output: -L/usr/local/lib -lpcre
I would like to figure out what is this -lpcre, and try to put into my libs
codeblocks said cannot find -llpcre, so i removed the minus and the l
just leave pcre in my libs in my ide codeblock and it works :O:O:O
the linking was ok :):):)
Just do not know why, I do not see the mystery.
If anybody can explain me, please do it.


Yours Sincerely
Szilveszter

s2ilveszter wrote:
> Dear Philip Hazel and Developers!
>
> I write to you because I did not find any forum or mailing list.
> I would like to use your great pcre library.
> I downloaded it from ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-7.8.zip
> I use mswin with msys1.0 http://fastbull.dl.sourceforge.net/sourceforge/mingw/MSYS-1.0.10.exe
> I did
>     unzipped pcre-7.8.zip
>     started msys, went to unzipped dir
>     ./configure --disable-shared
>     make
>     make install

>
>     back to codeblocks set the include and lib dirs,
>     add libs from .libs dir, put #include <pcrecpp.h> and some pcrecpp code into my app
>     and try to compile.
>     I get some errors,
>     after I had changed pcre_stringpiece.h line 59
>         from class PCRECPP_EXP_DEFN StringPiece {
>         to   class StringPiece {
>     and pcrecpparg.h line 57
>         from class PCRECPP_EXP_DEFN Arg {
>         to   class Arg {
> Compiling was without errors.

>
> But linking I get these errors:
> C:\msys1.0\pcre-7.8\.libs\libpcrecpp.a(pcrecpp.o):pcrecpp.cc:(.text+0x1f)||undefined reference to `_pcre_config'|
> C:\msys1.0\pcre-7.8\.libs\libpcrecpp.a(pcrecpp.o):pcrecpp.cc:(.text+0x11a)||undefined reference to `_pcre_exec'|
> C:\msys1.0\pcre-7.8\.libs\libpcrecpp.a(pcrecpp.o):pcrecpp.cc:(.text+0x18f)||undefined reference to `_pcre_fullinfo'|
> C:\msys1.0\pcre-7.8\.libs\libpcrecpp.a(pcrecpp.o):pcrecpp.cc:(.text+0x1abf)||undefined reference to `_pcre_compile'|
> C:\msys1.0\pcre-7.8\.libs\libpcrecpp.a(pcrecpp.o):pcrecpp.cc:(.text+0x1bc1)||undefined reference to `_pcre_compile'|
> C:\msys1.0\pcre-7.8\.libs\libpcrecpp.a(pcrecpp.o):pcrecpp.cc:(.text+0x1e24)||undefined reference to `_pcre_free'|
> C:\msys1.0\pcre-7.8\.libs\libpcrecpp.a(pcrecpp.o):pcrecpp.cc:(.text+0x1e37)||undefined reference to `_pcre_free'|
> ||=== Build finished: 7 errors, 0 warnings ===|
>
> I tried to clean my project & rebuild without solution.
>
> Any help would be appreciated.
>
> Yours sincerely,
> Szilveszter, Szilagyi
>