[test] minimal.hpp causing unresolved external with Intel on Windows

The little program below compiles and runs fine on most compilers, but with the Intel compiler there is an unresolved external: test.obj : error LNK2019: unresolved external symbol "void __cdecl boost::throw_exception(class std::exception const &)" (?throw_exception@boost@@YAXABVexception@std@@@Z) referenced in function _main test.exe : fatal error LNK1120: 1 unresolved externals --Beman #include <boost/test/minimal.hpp> int test_main(int, char*[]) { return 0; }

AMDG Beman Dawes wrote:
The little program below compiles and runs fine on most compilers, but with the Intel compiler there is an unresolved external:
test.obj : error LNK2019: unresolved external symbol "void __cdecl boost::throw_exception(class std::exception const &)" (?throw_exception@boost@@YAXABVexception@std@@@Z) referenced in function _main test.exe : fatal error LNK1120: 1 unresolved externals
Sounds like BOOST_NO_EXCEPTIONS is defined? In Christ, Steven Watanabe

On Sat, Nov 29, 2008 at 3:28 PM, Steven Watanabe <watanabesj@gmail.com>wrote:
AMDG
Beman Dawes wrote:
The little program below compiles and runs fine on most compilers, but with the Intel compiler there is an unresolved external:
test.obj : error LNK2019: unresolved external symbol "void __cdecl boost::throw_exception(class std::exception const &)" (?throw_exception@boost@@YAXABVexception@std@@@Z) referenced in function _main test.exe : fatal error LNK1120: 1 unresolved externals
Sounds like BOOST_NO_EXCEPTIONS is defined?
Yes, but where and why? It isn't coming from the command line.I invoked the compilers directly, not via bjam, so it isn't a Boost.Build problem. I did a quick scan through the test headers and didn't see anything at all suspicious. --Beman

AMDG Beman Dawes wrote:
The little program below compiles and runs fine on most compilers, but with the Intel compiler there is an unresolved external:
test.obj : error LNK2019: unresolved external symbol "void __cdecl boost::throw_exception(class std::exception const &)" (?throw_exception@boost@@YAXABVexception@std@@@Z) referenced in function _main test.exe : fatal error LNK1120: 1 unresolved externals
Sounds like BOOST_NO_EXCEPTIONS is defined?
Yes, but where and why? It isn't coming from the command line.I invoked the compilers directly, not via bjam, so it isn't a Boost.Build problem. I did a quick scan through the test headers and didn't see anything at all suspicious.
Well, I grepped through the headers and only boost/config/compiler/*.hpp sets BOOST_NO_EXCEPTIONS. I don't see how it's possible for it to be defined. Have you checked directly that it is defined? In Christ, Steven Watanabe

On Sat, Nov 29, 2008 at 7:50 PM, Steven Watanabe <watanabesj@gmail.com>wrote:
AMDG
Beman Dawes wrote:
The little program below compiles and runs fine on most compilers, but
with the Intel compiler there is an unresolved external:
test.obj : error LNK2019: unresolved external symbol "void __cdecl boost::throw_exception(class std::exception const &)" (?throw_exception@boost@@YAXABVexception@std@@@Z) referenced in function _main test.exe : fatal error LNK1120: 1 unresolved externals
Sounds like BOOST_NO_EXCEPTIONS is defined?
Yes, but where and why? It isn't coming from the command line.I invoked the compilers directly, not via bjam, so it isn't a Boost.Build problem. I did a quick scan through the test headers and didn't see anything at all suspicious.
Well, I grepped through the headers and only boost/config/compiler/*.hpp sets BOOST_NO_EXCEPTIONS. I don't see how it's possible for it to be defined. Have you checked directly that it is defined?
Adding code to check directly... Yep, BOOST_NO_EXCEPTIONS is being set for Intel, but not other compilers. Hum... The problem isn't in the Boost Test library at all. It is in boost/config/compiler/common_edg.hpp, lines 47-49: # if !defined(__KCC) && !defined(__EXCEPTIONS) # define BOOST_NO_EXCEPTIONS # endif If I comment those lines out, the problem disappears. One thing that changed in my setup about the time the problem appeared is that I moved from 32-bit XP to 64-bit XP. Perhaps there is an Intel bug related to that. I'll check Thanks for your help, Steven! --Beman
participants (2)
-
Beman Dawes
-
Steven Watanabe