Boost logo

Boost Users :

Subject: Re: [Boost-users] unit test on vc++ 64 bit application
From: Oodini (svdbg___free.fr)
Date: 2013-04-12 16:26:00


Learning also Boost.Test these days, I started a thread some days ago in this mailing list.

I invite you to search and read it.

----- Mail original -----
> De: "young" <yqin_99_at_[hidden]>
> À: boost-users_at_[hidden]
> Envoyé: Vendredi 12 Avril 2013 22:13:44
> Objet: Re: [Boost-users] unit test on vc++ 64 bit application
>
> I have build a 1.53 boost library for x64 and it seems works.
>
> But my unit test still not build successfully. But it looks like
> different
> issue.
>
> I have studio 2010 solution (just for my practice to use Boost Test)
> which
> include two simple win32 applications: one called MyMathApp and one
> for unit
> test called MyMathTest.
>
> In MyMathApp, it has class implemented in mymath.h / mymath.cpp. I
> want to
> unit test it in MyMathTest.
>
> In my MyMathApp, I have TestMyMath.cpp:
>
> #define BOOST_TEST_MAIN
> #include <boost/test/unit_test.hpp>
>
> #include "mymath.h"
>
> BOOST_AUTO_TEST_SUITE(CMyMathTests)
>
> BOOST_AUTO_TEST_CASE (test1)
> {
> CMyMath<int> m;
> BOOST_CHECK(m.add(2,3) == 5);
> }
>
> BOOST_AUTO_TEST_SUITE_END()
>
> I also add the mymath.h / mymath.cpp to my test project (not
> physically
> copy, just add to the project in solution explorer).
>
> When I build it, I got error:
> error LNK2019: unresolved external symbol "public: static int __cdecl
> CMyMath<int>::add(int,int)" (?add@?$CMyMath_at_H@@SAHHH_at_Z) referenced in
> function "public: void __cdecl
> CMyMathTests::test1::test_method(void)"
> (?test_method_at_constructortest1@CMyMathTests@@QEAAXXZ)
>
> What I missed?
>


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