Skip to content

Fixed duplicate declaration issue in Swift/ObjC bindings #27682

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 20, 2025

Conversation

asmorkalov
Copy link
Contributor

Fixed regression:

 /Users/opencv-cn/GHA-OCV-1/_work/opencv/opencv/ios/build/build-armv7-iphoneos/lib/Release/opencv2.framework/Headers/opencv2.h:80:9: note: in file included from /Users/opencv-cn/GHA-OCV-1/_work/opencv/opencv/ios/build/build-armv7-iphoneos/lib/Release/opencv2.framework/Headers/opencv2.h:80:
  #import <opencv2/Subdiv2D.h>
          ^
  /Users/opencv-cn/GHA-OCV-1/_work/opencv/opencv/ios/build/build-armv7-iphoneos/lib/Release/opencv2.framework/Headers/Subdiv2D.h:94:1: error: duplicate declaration of method 'initWithRect:'
  - (instancetype)initWithRect:(Rect2f*)rect;
  ^
  /Users/opencv-cn/GHA-OCV-1/_work/opencv/opencv/ios/build/build-armv7-iphoneos/lib/Release/opencv2.framework/Headers/Subdiv2D.h:88:1: note: previous declaration is here
  - (instancetype)initWithRect:(Rect2i*)rect;
  ^
  <module-includes>:1:9: note: in file included from <module-includes>:1:
  #import "Headers/opencv2.h"
          ^
  /Users/opencv-cn/GHA-OCV-1/_work/opencv/opencv/ios/build/build-armv7-iphoneos/lib/Release/opencv2.framework/Headers/opencv2.h:80:9: note: in file included from /Users/opencv-cn/GHA-OCV-1/_work/opencv/opencv/ios/build/build-armv7-iphoneos/lib/Release/opencv2.framework/Headers/opencv2.h:80:
  #import <opencv2/Subdiv2D.h>
          ^
  /Users/opencv-cn/GHA-OCV-1/_work/opencv/opencv/ios/build/build-armv7-iphoneos/lib/Release/opencv2.framework/Headers/Subdiv2D.h:120:1: error: duplicate declaration of method 'initDelaunay:'
  - (void)initDelaunay:(Rect2f*)rect NS_SWIFT_NAME(initDelaunay(rect:));
  ^
  /Users/opencv-cn/GHA-OCV-1/_work/opencv/opencv/ios/build/build-armv7-iphoneos/lib/Release/opencv2.framework/Headers/Subdiv2D.h:107:1: note: previous declaration is here
  - (void)initDelaunay:(Rect2i*)rect NS_SWIFT_NAME(initDelaunay(rect:));

Introduced in #27641

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
  • The PR is proposed to the proper branch
  • There is a reference to the original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

@asmorkalov asmorkalov force-pushed the as/ios_bindings_fix branch from 53214f8 to 0b84a54 Compare August 20, 2025 08:14
@asmorkalov asmorkalov self-assigned this Aug 20, 2025
@asmorkalov asmorkalov merged commit 719b86b into opencv:4.x Aug 20, 2025
23 of 28 checks passed
@asmorkalov asmorkalov mentioned this pull request Aug 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants