Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

How to include custom headers on top of generated cpp11.cpp?

Open
#216 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
cpp, r

Research direction

The issue names only the generated cpp11.cpp and an external_pointer; no source file or test is identified. Start by tracing how cpp11.cpp is generated and how C++ declarations are currently included, then determine the supported configuration or syntax for custom headers. Done means the requested header can be included reliably and the behavior is documented or covered by an example.

Written by the indexing model from the issue text.

Description

documentation

My function returns external_pointer<MyClass>. How can I get a definition of MyClass into cpp11.cpp?

I was hoping for a declaration like [cpp11:include] which I can put in front of some statement and it will be automatically included in cpp11.cpp. Is there such a thing?

Dominant language
C++
Stars
224
Forks
52
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from r-lib/cpp11

All issues in r-lib/cpp11

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.