Akim Demaille wrote:
>
> Alexandre, help!
>
> >>>>> "Lars" == Lars J Aas <[EMAIL PROTECTED]> writes:
>
> Lars> I've attached a config.log that shows more problems with exit().
> Lars> The problem is that the Visual C++ compiler thinks exit is
> Lars> declared to be exported from the library it is compiling, and
> Lars> not to be imported from another system library. This causes
> Lars> only a warning while compiling objects (exit status 0), but
> Lars> fails when we try to link an executable later in the configure
> Lars> script...
>
> What if s/AC_COMPILE_IFELSE/AC_LINK_IFELSE/.
>
> But anyway, I don't really understand what you say, and I'd really
> like to here from Alexandre on this...
>
> Alexandre, the interesting log chunk is:
>
> configure(3274) : error C2653: 'std' : is not a class or namespace name
> configure(3274) : warning C4273: 'exit' : inconsistent dll linkage. dllexport
>assumed.
> configure(3274) : error C2653: 'std' : is not a class or namespace name
> configure(3274) : error C2873: 'exit' : symbol cannot be used in a using-declaration
> configure:3288: $? = 2
> configure: failed program was:
> #line 3272 "configure"
> #include "confdefs.h"
> #include <stdlib.h>
> extern "C" void std::exit (int) throw (); using std::exit;
> int
> main ()
> {
> exit (42);
> ;
> return 0;
> }
<stdlib.h> declares exit() in one way, then this
test program declares exit() in another way.
I think the test should just say:
#include "confdefs.h"
#include <stdlib.h>
using std::exit;
int
main ()
{
exit (42);
;
return 0;
}
That is, the manual declaration of std::exit() should
be deleted.
Wan-Teh