Skip to content

Commit 30110e3

Browse files
committed
register cpp interface bootstrap function
1 parent bb17924 commit 30110e3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/attributes.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1958,6 +1958,11 @@ namespace attributes {
19581958
if (!hasPackageInit && !nativeRoutines_.empty()) {
19591959
ostr() << std::endl;
19601960
ostr() << "static const R_CallMethodDef CallEntries[] = {" << std::endl;
1961+
if (hasCppInterface()) {
1962+
ostr() << " {\"" << registerCCallableExportedName() << "\", " <<
1963+
"(DL_FUNC) &" << registerCCallableExportedName() << ", " <<
1964+
0 << "}," << std::endl;
1965+
}
19611966
for (std::size_t i=0;i<nativeRoutines_.size(); i++) {
19621967
const Attribute& attr = nativeRoutines_[i];
19631968
std::string routine = package() + "_" + attr.exportedName();

0 commit comments

Comments
 (0)