autoconf and gcc 3.0.1
Stefan Seefeld
seefeld@sympatico.ca
Mon Aug 20 19:33:00 GMT 2001
hi there, I just tried to configure and test-compile
an application with gcc 3.0.1 and run into the following
problem:
one of the autoconf macros inserts a declaration like
extern "C" void exit(int);
before user supplied code to test-compile a little
file to check for the availability of a given feature.
The code that I use starts with these three headers:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Compiling the above four lines with gcc 3.0.1 yields the
error:
bash$ g++ -c ~/foo.cc
In file included from /home/stefan/foo.cc:4:
/usr/include/stdlib.h:520: declaration of `void exit(int) throw ()' throws
different exceptions
/home/stefan/foo.cc:1: than previous declaration `void exit(int)'
bash$
so I'm trying to understand which of the participating tools
cause the trouble.
Thanks for the help,
Stefan
PS: I use autoconf version 2.13, and I do use the
AC_LANG_CPLUSPLUS macro just before running AC_TRY_RUN...
More information about the Gcc
mailing list