[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: More exit() troubles
From: |
Akim Demaille |
Subject: |
Re: More exit() troubles |
Date: |
18 Jan 2001 14:38:38 +0100 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Crater Lake) |
Alexandre, help!
>>>>> "Lars" == Lars J Aas <address@hidden> 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;
}
configure:3285: /cygdrive/d/coin/coin/cfg/m4/msvccc -c /MDd conftest.cc >&5
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); using std::exit;
int
main ()
{
exit (42);
;
return 0;
}
configure:3285: /cygdrive/d/coin/coin/cfg/m4/msvccc -c /MDd conftest.cc >&5
configure(3274) : warning C4273: 'exit' : inconsistent dll linkage. dllexport
assumed.
configure:3288: $? = 0
which means the compiler chose
extern "C" void exit (int) throw ();
but, agreed, the logs should be improved...
Lars> I don't use exit() in my configure tests, and none of the macros
Lars> I use use exit (I check), and autoconf only uses exit to check
Lars> for a declaration of exit. Can I please get an option to turn
Lars> off this bs test (AC_NEED_NO_STINKING_EXIT comes to mind)? I
Lars> really don't need the exit declaration - it's presence has only
Lars> caused problems for us at coin3d.org and our users...
I don't like this at all. Yet, if I have more or less understood what
you are saying, it seems to me that with AC_LINK_IFELSE,
_AC_PROG_CXX_EXIT_DECLARATION will chose `', i.e., no declaration at
all, which sounds like what you want.
Still, if the s/COMPILE/LINK/ works, I'd like to ask you to write the
comments we should include there, I don't feel I've have understood
enough to be able to...
- More exit() troubles, Lars J. Aas, 2001/01/18
- Re: More exit() troubles,
Akim Demaille <=
- Re: More exit() troubles, Alexandre Oliva, 2001/01/18
- Re: More exit() troubles, Akim Demaille, 2001/01/18
- Re: More exit() troubles, Lars J. Aas, 2001/01/19
- Re: More exit() troubles, Akim Demaille, 2001/01/19
- Re: More exit() troubles - the answer, Lars J. Aas, 2001/01/19
- Re: More exit() troubles - the answer, akim, 2001/01/19