JuliaLang / JuliaLang/PackageCompiler.jl

add #ifdef __cplusplus to headers?

Open
#811 0 comments 0 reactions 0 assignees View on GitHub
feature request
Dominant language
Julia
Stars
1.6k
Forks
205
Avg merge
18h 37m
Merged PRs (30d)
7

Description

Should something like in https://stackoverflow.com/questions/3789340/combining-c-and-c-how-does-ifdef-cplusplus-work question part inserted to every header when building library ? So library users in cpp don' t need to do it manually.

Found a [post](https://www.functionalnoise.com/pages/2022-07-21-embedding/#interlude_name_mangling) that also took sometime to figure this out. For modern cpp programmers who don' t use C libraries directly often. This could be easilly forgotten.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by inspecting how PackageCompiler.jl exposes library headers during a build, then compare the requested C++ linkage guards with the linked Stack Overflow explanation. Determine which headers require the guards and verify that a C++ consumer can include them without adding manual wrappers.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.