Boost logo

Boost Users :

Subject: Re: [Boost-users] unit test on vc++ 64 bit application
From: young (yqin_99_at_[hidden])
Date: 2013-04-12 16:13:44


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?

--
View this message in context: http://boost.2283326.n4.nabble.com/unit-test-on-vc-64-bit-application-tp4645173p4645257.html
Sent from the Boost - Users mailing list archive at Nabble.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