[Rcpp-devel] violates the C++ One Definition Rule ?
Toby Hocking
tdhock5 at gmail.com
Mon Jan 24 20:55:29 CET 2022
Hi Rcpp Devs,
Does anyone know how to fix this warning in a package with LinkingTo:
RcppArmadillo? My package plotHMM
https://www.stats.ox.ac.uk/pub/bdr/LTO/plotHMM.out got this message on CRAN
Additional Checks LTO flavor,
https://www.stats.ox.ac.uk/pub/bdr/LTO/README.txt
g++ -std=gnu++14 -shared -L/usr/local/lib64 -o plotHMM.so
RcppExports.o backward.o eln.o forward.o interface.o multiply.o
pairwise.o transition.o viterbi.o
/data/gannet/ripley/R/test-4.2/RcppArmadillo/include/armadillo_bits/glue_solve_bones.hpp:84:10:
warning: type ‘struct opts’ violates the C++ One Definition Rule
[-Wodr]
84 | struct opts
| ^
/data/gannet/ripley/R/test-4.2/RcppArmadillo/include/armadillo_bits/glue_solve_bones.hpp:84:10:
note: a different type is defined in another translation unit
84 | struct opts
| ^
/data/gannet/ripley/R/test-4.2/RcppArmadillo/include/armadillo_bits/glue_solve_bones.hpp:86:17:
note: the first difference of corresponding definitions is field
‘flags’
86 | const uword flags;
| ^
/data/gannet/ripley/R/test-4.2/RcppArmadillo/include/armadillo_bits/glue_solve_bones.hpp:86:17:
note: a field of same name but different type is defined in another
translation unit
86 | const uword flags;
| ^
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20220124/a8ea56fa/attachment.html>
More information about the Rcpp-devel
mailing list