Hi, I'm new to C++ and C::B.
I'm almost sure my problem is related to project dependency, but it could be related to C++ too. I tried what is explained in
The build process of C::B but didn't understand well.
Right now I have 3 projects in my workspace:
1- My project itself.
2- A project for unit testing.
3- The UnitTest++ library (I used the
Unit Testing tutorial for this).
2 and 3 are working good together. 2 recognizes 3.
But it seems 2 can't use 1's code.
I'm trying to write a unit test (2), but when I try to instantiate an object (1), I get this error:
undefined reference to `MyClass::MyClass(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)
The code was:
MyClass obj("/home/otto/path/to/file");
I don't if it's worth pasting here code of my classes (they are three right now). If it's necessary, I'll do.
What I've tried:
- In project 2 properties > project's dependencies > added project 1.
- Again in properties > project's build options > debug target > search directories > added project 1 path in linker (it was already in compiler).
None of these worked.