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:

https://groups.google.com/forum/#!topic/dealii/MSf38tKGTp8

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

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to