Skip to content

objc: rework headers import#18811

Merged
opencv-pushbot merged 1 commit intoopencv:masterfrom
alalek:objc_headers_import
Nov 16, 2020
Merged

objc: rework headers import#18811
opencv-pushbot merged 1 commit intoopencv:masterfrom
alalek:objc_headers_import

Conversation

@alalek
Copy link
Copy Markdown
Member

@alalek alalek commented Nov 14, 2020

  • 'AdditionalImports' can be removed from misc/objc/gen_dict.json

/cc @komakai

force_builders_only=docs,ios,Custom Mac
Xbuild_image:Custom Mac=osx_framework
build_image:Custom Mac=osx_framework-test
buildworker:Custom Mac=macosx-2
build_contrib:Custom Mac=OFF

@komakai
Copy link
Copy Markdown
Contributor

komakai commented Nov 15, 2020

Still hitting the Apple NO macro conflict problem

@alalek
Copy link
Copy Markdown
Member Author

alalek commented Nov 15, 2020

Related error message:

In file included from build/build-armv7-iphoneos/modules/objc/gen/objc/calib3d/Calib3d.mm:9:
In file included from build/build-armv7-iphoneos/modules/objc/gen/objc/core/Double3.h:10:
In file included from build/build-armv7-iphoneos/install/include/opencv2/opencv.hpp:86:
In file included from build/build-armv7-iphoneos/install/include/opencv2/stitching.hpp:51:
build/build_ios/build/build-armv7-iphoneos/install/include/opencv2/stitching/detail/exposure_compensate.hpp:47:4: warning: Detected Apple 'NO' macro definition, it can cause build conflicts. Please, include this header before any Apple headers. [-W#warnings]
#  warning Detected Apple 'NO' macro definition, it can cause build conflicts. Please, include this header before any Apple headers.
   ^
build/build_ios/build/build-armv7-iphoneos/install/include/opencv2/stitching/detail/exposure_compensate.hpp:66:12: error: expected identifier
    enum { NO, GAIN, GAIN_BLOCKS, CHANNELS, CHANNELS_BLOCKS };
           ^

opencv.hpp

I believe problem comes from here.
Need to cleanup its usage.

@komakai
Copy link
Copy Markdown
Contributor

komakai commented Nov 15, 2020

I believe problem comes from here.

Yes that's it

Need to cleanup its usage.

Maybe just go for a breaking change like here and resolve this once and for all:
komakai@b3513b8

- 'AdditionalImports' can be removed from misc/objc/gen_dict.json
- avoid using of legacy 'opencv.hpp'
@alalek
Copy link
Copy Markdown
Member Author

alalek commented Nov 16, 2020

👍

@opencv-pushbot opencv-pushbot merged commit 14aa8af into opencv:master Nov 16, 2020
@alalek alalek mentioned this pull request Nov 27, 2020
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.

3 participants