autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: pkg-config wisdom


From: John Calcote
Subject: Re: pkg-config wisdom
Date: Mon, 26 Oct 2009 10:46:07 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.4pre) Gecko/20090915 Thunderbird/3.0b4

Matěj,

On 10/25/2009 8:05 AM, Matěj Týč wrote:
There is one big issue with AC_SEARCH_LIBS: If you use a different
calling convention than cdecl (like stdcall, but I don't know, they've
just told me), you will get unresolved symbols if you try to link
without a proper include file (or something like that). Which means you
can't rely on that macro, especially when it concerns Windows libraries.
This is quite catastrophic, isn't it? What else than pkg-config would be

Is not this an issue with AC_CHECK_LIB also? I don't believe AC_SEARCH_LIBS suffers any greater issues than AC_CHECK_LIB.

The problem is that both macros use a common prototype for all symbols: char * funcname(void);

cdecl is assumed here, because no other calling convention attribute is supplied on the prototype.

Ralf, one possible enhancement might be to allow the user to specify the function prototype manually in an optional argument to either of these macros. This might very well solve the C++ problem, however, it wouldn't really solve the C non-cdecl calling convention issue because calling convention decoration attributes are compiler specific.

John




reply via email to

[Prev in Thread] Current Thread [Next in Thread]