From: Matthias Maier Date: Sat, 20 Feb 2021 00:19:15 +0000 (-0600) Subject: Sundials: Mark function as inline X-Git-Tag: v9.3.0-rc1~432^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F11781%2Fhead;p=dealii.git Sundials: Mark function as inline These two functions have a complete definition in a header file that gets including in multiple compilation units. In this case we have to mark these functions as "inline" so that the compiler emits a so-called "weak symbol". Otherwise linkage will fail due to multiply defined symbols. --- diff --git a/include/deal.II/sundials/sunlinsol_newempty.h b/include/deal.II/sundials/sunlinsol_newempty.h index b992d66c23..d0d1fb1484 100644 --- a/include/deal.II/sundials/sunlinsol_newempty.h +++ b/include/deal.II/sundials/sunlinsol_newempty.h @@ -41,7 +41,7 @@ namespace SUNDIALS * Create a new SUNLinearSolver structure without any content and * operations set to `nullptr`. */ - SUNLinearSolver + inline SUNLinearSolver SUNLinSolNewEmpty() { /* create linear solver object */ @@ -80,7 +80,7 @@ namespace SUNDIALS * * @param solver The solver memory to free */ - void + inline void SUNLinSolFreeEmpty(SUNLinearSolver solver) { if (solver == nullptr)