Re: [deal.II] Trouble with including deal.II functions into user-written library

12 views
Skip to first unread message

Wolfgang Bangerth

unread,
Jun 8, 2023, 8:08:43 PM6/8/23
to dea...@googlegroups.com
On 6/7/23 14:29, Kyle Schwiebert wrote:
>
> This seems to match the CMake documentation example. However, upon running
> 'make les' I immediately get the following error while it's compiling
> BlockHelpers.cpp:
>
> error: expected class-name before ‘{’ token
>
> regarding this class definition in the associated header, BlockHelpers.hpp:
> template< typename MatrixType, typename VectorType>
> class SystemMatrixWrapper : public Subscriptor
> {
> //class def
> ...
> }
>
> As far as I can tell, this issue is being caused by an issue linking to the
> deal.II files and thus the compiler does not recognize Subscriptor as a class.
> When I comment out ': public Subscriptor' this error disappears.
>
> The file does include the subscriptor class with the line:
> #include <deal.II/base/subscriptor.h>
>
> about which the compiler/preprocessor does not complain.
>
> How can I resolve this issue? Any advice would be most appreciated. I suspect
> there is an issue with my CMakeLists.txt file.

Kyle:
the class name is dealii::Subscriptor, not Subscriptor. Are you saying
using namespace dealii;
somewhere higher up in the file?

Best
W.

--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/


Reply all
Reply to author
Forward
0 new messages