Closed mdenty closed 2 months ago
For this particular case I think you can use SIFT::create_def_1
(automatic naming sorry ^^”). The *_def
functions are the variants of regular functions but without the arguments that have a default value in C++. In general case you can also check opencv_branch_34 and friends, but that’s for major OpenCV branches.
Good to know about *_def
functions. I'll keep that in mind.
For some reason the SIFT::create_def_1
is not found under Linux:
error[E0599]: no function or associated item named `create_def_1` found for struct `SIFT` in the current scope
--> src/some/dir/model.rs:390:28
|
390 | let sift = <SIFT>::create_def_1(
| ^^^^^^^^^^^^
| |
| function or associated item not found in `SIFT`
| help: there is an associated function with a similar name: `create_def`
For more information about this error, try `rustc --explain E0599`.
error: could not compile `project` (lib) due to previous error
It compiles fine under macOS, tho.
Back to square # 1.
This happens because of automatic renaming and the way how those functions are defined between those OpenCV versions. I'll try to fix this particular issue in the next create release.
After some tries it looks like it won't really work unfortunately. The most robust solution in your case is to have matching OpenCV versions between the environments.
rustc --version
)The issue is that I code:
It compiles fine on the Mac but fails on the Linux box with the error message:
The argument
enable_precise_upscale
appeared in version 4.8.0.What is the best way to cope with this problem? I do not want to do a conditional compilation OS kind, since it will probably fail when 24.04 will be out.
For today, I did what I did not want to do: