|
Boost Users : |
Subject: Re: [Boost-users] [boost.test] Missing entry point when statically linking to VC2012 but no problem with VC2010
From: Marco Craveiro (marco.craveiro_at_[hidden])
Date: 2012-07-03 14:52:31
Hi Tom,
shouldn't it be
#include <boost/test/included/unit_test.hpp>
on the include?
Cheers
Marco
On 3 July 2012 16:25, Tan, Tom (Shanghai) <TTan_at_[hidden]> wrote:
> I have been using a source template for unit test with boost.test, which
> used to be working well until I started to use VC2012 RC. ****
>
> ** **
>
> ** **
>
> Heres a minimal repo:****
>
> ** **
>
> #include <boost/test/unit_test.hpp>****
>
> using namespace boost::unit_test::framework;****
>
> using namespace boost::unit_test;****
>
> ** **
>
> test_suite* init_unit_test_suite(int argc, char *argv[])****
>
> {****
>
> BOOST_TEST_MESSAGE("hello test.");****
>
> ** **
>
> return 0;****
>
> }****
>
> ** **
>
> ** **
>
> With the same build options:****
>
> cl.exe /EHsc /MT main.cpp****
>
> ** **
>
> VC2010 compiles fine. VC2012 outputs: ****
>
> LINK : fatal error LNK1561: entry point must be defined.****
>
> ** **
>
> Added BOOST_TEST_MAIN caused errors for both compilers.****
>
> error C2084: function 'boost::unit_test::test_suite
> *init_unit_test_suite(int,char *[])' already has a body****
>
> ** **
>
> I tested on both 1.49 and 1.50. And the results are the same. I suspect
> there is a bug of version check against MSVC but could not locate it.****
>
> ** **
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
-- So young, and already so unknown -- Pauli blog: http://mcraveiro.blogspot.com
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