Usage of precompiled header

Open
#1,795 12 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
cmake, cpp

Research direction

Start by tracing how CMake-configured precompiled headers are represented during CppSharp parsing, using the reported and assert failure as the reproduction. Determine how declarations from a precompiled header should become available to the parser, then verify that the same example no longer reports the undeclared identifier.

Written by the indexing model from the issue text.

Description

As you may know, some libraries use precompiled headers which are configured in CMake.
How to include such headers, since they are not explicitly included in the source code?
Because when <cassert> is included in a precompiled header I am getting:

error: use of undeclared identifier 'assert'
CppSharp has encountered an error while parsing code.
Dominant language
C#
Stars
3.4k
Forks
541
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 mono/CppSharp

All issues in mono/CppSharp

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.