|
Boost Users : |
Subject: [Boost-users] Inconsistent dll linkage trying to use boost/test as dll
From: McNamara, Nate (nate.mcnamara_at_[hidden])
Date: 2010-04-16 14:39:33
I'm a newbie, and I'm trying to get the most basic example unit test up
and running. The following works:
#define BOOST_TEST_MAIN
#include <boost/test/included/unit_test.hpp>
BOOST_AUTO_TEST_CASE(my_test)
{
BOOST_CHECK_EQUAL(4, 4);
}
However, it takes a while to compile, so I want to use the DLL version
of the library. I built the DLL according to the instructions here:
http://www.boost.org/doc/libs/1_42_0/libs/test/doc/html/utf/compilation/
standalone.html
Then I updated my source as follows:
#define BOOST_TEST_DYN_LINK
#include <boost/test/included/unit_test.hpp>
BOOST_AUTO_TEST_CASE(my_test) {
BOOST_CHECK_EQUAL(4, 4);
}
When compiling the above, though, I get a seemingly unending stream of
C4273 warnings:
C:\Program
Files\\boost\boost_1_42\boost/test/impl/compiler_log_formatter.ipp(61
) : warning C4273:
'boost::unit_test::output::compiler_log_formatter::log_start'
: inconsistent dll linkage
C:\Program
Files\\boost\boost_1_42\boost/test/output/compiler_log_format
ter.hpp(39) : see previous definition of 'log_start'
C:\Program
Files\\boost\boost_1_42\boost/test/impl/compiler_log_formatter.ipp(71
) : warning C4273:
'boost::unit_test::output::compiler_log_formatter::log_finish
' : inconsistent dll linkage
C:\Program
Files\\boost\boost_1_42\boost/test/output/compiler_log_format
ter.hpp(40) : see previous definition of 'log_finish'
C:\Program
Files\\boost\boost_1_42\boost/test/impl/compiler_log_formatter.ipp(79
) : warning C4273:
'boost::unit_test::output::compiler_log_formatter::log_build_
info' : inconsistent dll linkage
etc.
Any hints re: what I'm doing wrong are much appreciated.
Cheers,
Nate
________________________________________
This E-Mail (including any attachments) may contain privileged or confidential information. It is intended only for the addressee(s) indicated above.
The sender does not waive any of its rights, privileges or other protections respecting this information.
Any distribution, copying or other use of this E-Mail or the information it contains, by other than an intended recipient, is not sanctioned and is prohibited.
If you received this E-Mail in error, please delete it and advise the sender (by return E-Mail or otherwise) immediately.
This E-Mail (including any attachments) has been scanned for viruses.
It is believed to be free of any virus or other defect that might affect any computer system into which it is received and opened.
However, it is the responsibility of the recipient to ensure that it is virus free.
The sender accepts no responsibility for any loss or damage arising in any way from its use.
E-Mail received by or sent from RBC Capital Markets is subject to review by Supervisory personnel.
Such communications are retained and may be produced to regulatory authorities or others with legal rights to the information.
IRS CIRCULAR 230 NOTICE: TO COMPLY WITH U.S. TREASURY REGULATIONS, WE ADVISE YOU THAT ANY U.S. FEDERAL TAX ADVICE INCLUDED IN THIS COMMUNICATION IS NOT INTENDED OR WRITTEN TO BE USED, AND CANNOT BE USED, TO AVOID ANY U.S. FEDERAL TAX PENALTIES OR TO PROMOTE, MARKET, OR RECOMMEND TO ANOTHER PARTY ANY TRANSACTION OR MATTER.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net