Skip to content

Bindings generator needs basic #if support #12972

Closed

Description

@alalek

Headers parser is broken by pre-processor #if

Python generator emits warnings:

[1/1] Generate files for Python bindings and documentation
Note: Class Feature2D has more than 1 base class (not supported by Python C extensions)
      Bases:  cv::Algorithm, cv::class, cv::Feature2D, cv::Algorithm
      Only the first base class will be used

It tries to parse this statement:

class CV_EXPORTS_W Feature2D : public Algorithm class CV_EXPORTS_W Feature2D : public virtual Algorithm

This is wrong.

Activity

  1. dkurt commented on Nov 2, 2018

    @dkurt
    Member

    related #10175

  2. crackwitz commented on Aug 23, 2019

    @crackwitz
    Contributor

    what's the suggested course of action? extend parser to respect preprocessor directives? run headers through compiler's C preprocessor before parsing? something else?

  3. added this to the 4.12.0 milestone on May 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions