Boost logo

Boost :

Subject: [boost] Problem with using matrix library with unit test library
From: SHIVAM MITTAL (2015csb1032_at_[hidden])
Date: 2017-03-20 16:50:03


Hi everyone,
I have been developing something, and basically it requires the two boost
libraries - the matrix library and unit test library.

I have a file test.cpp :

#include <boost/numeric/ublas/matrix.hpp>
#include <boost/numeric/ublas/io.hpp>
#include <boost/test/included/unit_test.hpp>

#define BOOST_TEST_DYN_LINK
#define BOOST_TEST_MODULE test

BOOST_AUTO_TEST_SUITE(Integer_matrices)

BOOST_AUTO_TEST_CASE(Constructors)
{
BOOST_CHECK(2 == 2);
}

BOOST_AUTO_TEST_SUITE_END()

I am compiling this with:
g++ -I <path to boost_1_63_0> test.cpp

I'm getting the following error:
/tmp/ccnxRzsf.o: In function `main':
test.cpp:(.text+0x18aa1): undefined reference to `init_unit_test_suite(int,
char**)'
collect2: error: ld returned 1 exit status

Any help will be greatly appreciated.
Thanks.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk