automake
[Top][All Lists]
Advanced

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

Re: Problem with AC_LINK_IFELSE and library order


From: Francesco Montorsi
Subject: Re: Problem with AC_LINK_IFELSE and library order
Date: Sat, 22 Oct 2005 00:07:53 +0200
User-agent: Mozilla Thunderbird 1.0.7-1.1.fc4 (X11/20050929)

another thing: I cannot use AC_CHECK_LIB because the library I'm trying to test doesn't have a global function; I tried using a C++ instance built on the fly:

AC_CHECK_LIB([mylib], [wxHTTPBuilder().GetBytesRead])

but this doesn't work since the generated program looks like:

| /* confdefs.h.  */
|
| #define PACKAGE_NAME "webupdate"
| #define PACKAGE_TARNAME "webupdate"
| #define PACKAGE_VERSION "1.0"
| #define PACKAGE_STRING "webupdate 1.0"
| #define PACKAGE_BUGREPORT "address@hidden"
| #ifdef __cplusplus
| extern "C" void std::exit (int) throw (); using std::exit;
| #endif
| /* end confdefs.h.  */
|
| /* Override any gcc2 internal prototype to avoid an error.  */
| #ifdef __cplusplus
| extern "C"
| #endif
| /* We use char because int might match the return type of a gcc2
|    builtin and then its argument prototype would still apply.  */
| char wxHTTPBuilder().GetBytesRead ();
| int
| main ()
| {
| wxHTTPBuilder().GetBytesRead ();
|   ;
|   return 0;
| }


and the line

        char wxHTTPBuilder().GetBytesRead ();

is obviously invalid...

How can I solve this ?

Thanks,
Francesco





reply via email to

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