I have a test.cpp file, written for using boost unit test.
test.cpp :
#define BOOST_TEST_DYN_LINK
#include <boost/test/unit_test.hpp>
.........
I am trying to linking this test.cpp with a library named liba.
g++ test.cpp -L/liba_directory -la
keeps giving error message that one class in my liba is not declared. At the same time, another class in the same library can be found.
as a positive control, I linked this library with my main file, which works fine.
g++ main.cpp -L/liba_directory -la
passes compilation perfectly fine.
Looks like files for one specific class in my compiled library can't be seen by my test file, but perfectly accessible for my main file. Can anyone give me some suggestions?