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

Re: autoconf macros and C++



On Thu, 15 Feb 2001, Jaldhar H. Vyas wrote:

> Huh, hears an interesting thing.  If I use main as the function I'm
> checking then it works.  But libapt-pkg.so.2.7 doesn't have a main
> function.

Yes, because the program that gets compiled is

int main(int argc, char *argv[]) {
        main();
}

And this program has no unresolved symbols after linking. The test works
fine as long as your linker emits an error if it cannot find an unneeded
library, which isn't true on all platforms. :-(

   Simon

-- 
GPG public key available from http://phobos.fs.tum.de/pgp/Simon.Richter.asc
 Fingerprint: DC26 EB8D 1F35 4F44 2934  7583 DBB6 F98D 9198 3292
Hi! I'm a .signature virus! Copy me into your ~/.signature to help me spread!



Reply to: