Hello,
I have project where I would like to use multiple source and header files that are in /source and /include subfolders. The CMakelists.txt is in the root. Otherwise the program can be compiled without errors but I am getting some linking errors.
In function `main':
undefined reference to `poisson::PProblem<2>::declare_parameters()'
undefined reference to `poisson::PProblem<2>::run()'
My CMakelists.txt follows the one presented in this discussion but I have fixed the paths to the files:
Since it is a templated object, I have provided the following instantiations in the source files.
foo.h:
/* Declaration: */
template<int dim>
class PProblem {};
foo.cpp:
namespace pdd {
/* Definition ... */
/* Instantiation: */
template class PProblem<2> p_test_problem;
}
Do you have any suggestions or comments, how to solve the linking problem?
-Heikki