Hello,

I'm just beginning to combine several files from my work into a more 
cohesive whole. To do this I'm trying to modularize the code and am thus 
taking a first stab at linking a user-defined library to deal.II.

I have the following in my CMakeLists.txt:
CMAKE_MINIMUM_REQUIRED(VERSION 3.16.3)

FIND_PACKAGE(deal.II 9.2.0 REQUIRED)

DEAL_II_INITIALIZE_CACHED_VARIABLES()

PROJECT(myproject)

ADD_LIBRARY(les ./Helper/BlockHelpers.cpp ./Solvers/direct_solver.cpp 
./Models/ADM.cpp)
DEAL_II_SETUP_TARGET(les)

ADD_EXECUTABLE(channel_flow ./Test_Cases/turbulent_channel.cpp)
DEAL_II_SETUP_TARGET(channel_flow)
target_link_libraries(les)

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.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/b93cd1a0-727b-4417-a7f4-5590f754cc63n%40googlegroups.com.

Reply via email to