Here is the RcppTskit repo https://github.com/HighlanderLab/RcppTskit
Vignette describes the linking process https://github.com/HighlanderLab/RcppTskit/blob/main/RcppTskit/vignettes/RcppTskit_intro.qmd (use case 4)
Here is a demo R package demonstrating this process https://github.com/HighlanderLab/RcppTskitTestLinking
I previously checked how to link against tskitr (older version of RcppTskit). We should now adopt the approach in full from RcppTskitTestLinking (this approach was tested on Linux, macOS, Windows).