Skip to content

Fix C++Builder compile errors on V7 compatibility constants - #1401

Merged
Daniel-Tr merged 5 commits into
JAM-Software:masterfrom
zencode1:cpp-v7-compatibility-constants
Sep 22, 2026
Merged

Daniel-Tr merged 5 commits into
JAM-Software:masterfrom
zencode1:cpp-v7-compatibility-constants

Conversation

@zencode1

Copy link
Copy Markdown
Contributor

The V7 backward-compatibility constants in VirtualTrees.pas (e.g. ctNone = VirtualTrees.Types.TCheckType.ctNone) alias scoped enum members. Without telling the C++ header generator about that, C++Builder users encounter ambiguity compiler errors when these are translated to .hpp.

This PR adds, for each constant in VirtualTrees.pas:

  • {$EXTERNALSYM} - stops the .hpp generator from emitting a conflicting redeclaration for the symbol.
  • {$HPPEMIT} - restores the plain, unscoped C++ alias

Additional changes:

  • Grouped the constants by source enum with a comment for readability.
  • Fixed csMixedDisable -> csMixedDisabled (typo - didn't match the enum member it was meant to alias).
  • Removed the alignment spacing since it distracted from readability due to the grouped compiler directives

No runtime/behavior change - Delphi consumers are unaffected; this only fixes header generation for C++Builder.

Suggest any formatting changes if I didn't match the repository standards.

@Daniel-Tr Daniel-Tr left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to me, I don't have access to the tooling to verify the change though.

@Daniel-Tr
Daniel-Tr merged commit 311d990 into JAM-Software:master Sep 22, 2026
@Daniel-Tr

Copy link
Copy Markdown
Collaborator

I reviewed the change and couldn't see any obvious errors. I can't verify this with the C++ Builder though.

@joachimmarder joachimmarder added this to the V8.5 milestone Sep 22, 2026
@zencode1
zencode1 deleted the cpp-v7-compatibility-constants branch September 22, 2026 23:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants