This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: duplicate regexec/regcomp functions detected


On Thu, Dec 27, 2001 at 06:22:43PM +0100, Ralf Habacker wrote:
>> -----Original Message-----
>> From: cygwin-owner@cygwin.com [mailto:cygwin-owner@cygwin.com]On Behalf
>> Of Corinna Vinschen
>> Sent: Friday, December 14, 2001 11:36 AM
>> To: cygwin
>> Subject: Re: duplicate regexec/regcomp functions detected
>>
>>
>> On Thu, Dec 13, 2001 at 09:18:39PM +0100, Ralf Habacker wrote:
>> > Hi all,
>> >
>> > kde needs the regexp functions regexec and regcomp.
>> >
>> > The cygwin lib contains the System V8 function call style, while the pcre
>> package (pcreposix)
>> > provides another style (the system V style I guess). The problem is now, that both libs
>> > supports the same names for regexec and regcomp but with different
>> parameter/return types.
>> > This results sometimes in execution failures if the libs are not in the right order like
>> > shown in the following example.
>> >
>> > pcre regexp wanted
>> >
>> > $ gcc ... -lpcreposix -lcygwin   -> okay
>> >
>> > $ gcc ... -lpthreads|-lm|-lc -lpcreposix -lcygwin   -> failure: the functions in
>> cygwin lib
>> > are used
>>
>> But that order should never happen EXCEPT you're making the big
>> mistake to give `-lm' or `-lc' on the command line explicitly.
>> Since -lcygwin is appended automagically and libc.a and libm.a
>> are the same library anyway, the answer is simply, "Don't do that."
>
>This may be for -lm and -lc, but what about libpthread
>
>Think about this link line:
>
>gcc -o test -lpthread main.o [-lcygwin]
>
>This will result in multiple defined symbols for WinMain (expected that
>main.o contains a main function).  You can say don't do this, but what
>about bigger packages like qt.  The qt configuring process does only
>allow like the above link line.

The above link line makes no sense.  It is wrong.  It should be
corrected.

cgf

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]