-
Notifications
You must be signed in to change notification settings - Fork 0
Problem with substitution #2
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
base: master
Are you sure you want to change the base?
Conversation
| #include <opencv2/gapi/own/types.hpp> // cv::gapi::own::Rect/Size/Point | ||
| #include <opencv2/gapi/own/scalar.hpp> // cv::gapi::own::Scalar | ||
|
|
||
| #include <opencv2/gapi/gmat.hpp> // call opencv_includes.hpp, that call cvdefs.hpp, that call gmat.hpp, ... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is first way with include<gmat.hpp> for descr_of function.
| // GMatDesc descr_of(const Mat &mat); // another way: error-> conflicts with a previous declaration in gmat.hpp | ||
| }} // namespace gapi::own | ||
|
|
||
| using gapi::own::descr_of; // with include gmat.hpp it has not been declared |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We get error ‘fluidcv::gapi::own::descr_of’ has not been declared
| #define OPENCV_GAPI_OPENCV_INCLUDES_HPP | ||
|
|
||
| #if !defined(GAPI_STANDALONE) | ||
| #if !defined(GAPI_STANDALONE) // |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
opencv_includes.hpp - fork for include files.
| // replacement of cv's structures: | ||
| namespace gapi { namespace own { | ||
| class Mat; | ||
| // GMatDesc descr_of(const Mat &mat); // another way: error-> conflicts with a previous declaration in gmat.hpp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another way - we don't include gmat.hpp. We put a function prototype.
cv::gapi::own::descr_of(const gapi::own::Mat &)
| #endif // !defined(GAPI_STANDALONE) | ||
|
|
||
| GAPI_EXPORTS GMatDesc descr_of(const cv::Mat &mat); | ||
| GAPI_EXPORTS GMatDesc descr_of(const cv::Mat &mat); //another way: previous declaration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And we get error: conflicts with a previous declaration (212 str.).
We include opencv_includes.hpp (cvdefs.hpp in STANDALONE) in gmat.hpp.
cvdefs.hpp: cv::gapi::own::descr_of(const gapi::own::Mat &)
gmat.hpp: cv::descr_of(const gapi::own::Mat &)
It is logical, but i can't put declaration of function under STANDALONE flag in cvdefs.
|
@anton-potapov Two ways (in comment) with bad end. I can't unravel it. It is for STANDALONE build (cv::Mat == own::Mat and etc.) |
|
@mpashchenkov , please see here opencv#17268 |
Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.