[pcre-dev] pcreposix links without -lpcreposix

Góra strony
Delete this message
Autor: Ivan Andrus
Data:  
Dla: pcre-dev
Temat: [pcre-dev] pcreposix links without -lpcreposix
PCRE devs,

First off thanks for your great work. I just have a small problem, though I don't know if it's possible to fix.

I recently decided to support POSIX regular expressions in ChkTeX in case PCRE wasn't available. I decided to use the pcreposix interface. I spent forever trying to debug my code but it turns out that I had simply forgotten to link with pcreposix. I hadn't updated my configure.in yet to call pcre-config --libs-posix etc. The bad thing is that it linked okay, but gave strange results when trying to use it. I guess it's linking against the POSIX library, but with the constants defined in pcreposix.h.

Is there a way to cause a link error if I'm not linking with pcreposix? Perhaps define regcomp as a macro expanding to a pcre_regcomp function or something? It's not a problem for me, I figured it out now, but it was very confusing until I did.

I'm not subscribed so please keep me CC'd.

Thanks,
Ivan