[pcre-dev] BAD name PCRE_STATIC

Αρχική Σελίδα
Delete this message
Συντάκτης: Robert Wishlaw
Ημερομηνία:  
Προς: PCRE
Αντικείμενο: [pcre-dev] BAD name PCRE_STATIC
I was experiencing the similar problems to those Sheri described

*>> Creating library file: .libs/libpcre.dll.a
>> .libs/libpcre.a(pcreposix.o):pcreposix.c:(.text+0xec): undefined
>> reference to `_imp__pcre_free'
>> .libs/libpcre.a(pcreposix.o):pcreposix.c:(.text+0x161): undefined
>> reference to `_imp__pcre_compile2'
>> .libs/libpcre.a(pcreposix.o):pcreposix.c:(.text+0x194): undefined
>> reference to `_imp__pcre_info'
>> .libs/libpcre.a(pcreposix.o):pcreposix.c:(.text+0x25b): undefined
>> reference to `_imp__pcre_exec'
>> collect2: ld returned 1 exit status *


when trying to compile a Windows DLL with Pelle's C.

I had not added the define PCRE_STATIC to my build because I was not
building a STATIC library, I was building a DLL, so I assumed,
incorrectly, that the STATIC in PCRE_STATIC referred to a STATIC library.

When looking at the declspec defines I thought Richard Daniel had got it
backwards until I realized that the PRCE_STATIC define had to be used when
building a DLL but not when building a STATIC library.

In my opinion, the name of the define PCRE_STATIC should be changed to
PCRE_DLL.

declspec ... no wonder U**x developers hate Windows.

Robert Wishlaw