You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: After some investgation, I realize that this has nothing to do with the build process, but something associated with PowerShell. Sorry for the disturbance!
And I should have realized this earlier when seeing pwsh's highlighting:
So the proper way to pass a decimal might be like -a="1.234".
I was trying to make use of OpenCV's cv::CommandLineParser. According to OpenCV's doc about cv::CommandLineParser, built from the following code should, the executable should parse command line options like:
$ ./cli_parse.exe -a=0.45 -B=0.38a: 0.45; b: 0.38
And it works just right while using MSYS2's MinGW-w64-x86_64 toochain (MinGW gcc and OpenCV 4.2). However when I try to build it using vcpkg's toolchain with MSVC 17(Visual Studio 2022 Preview, host amd64, targeting amd64), the executable works (in pwsh7) as below:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Note: After some investgation, I realize that this has nothing to do with the build process, but something associated with PowerShell. Sorry for the disturbance!
So the proper way to pass a decimal might be like
-a="1.234"
.I was trying to make use of OpenCV's
cv::CommandLineParser
. According to OpenCV's doc aboutcv::CommandLineParser
, built from the following code should, the executable should parse command line options like:And it works just right while using MSYS2's MinGW-w64-x86_64 toochain (MinGW gcc and OpenCV 4.2). However when I try to build it using vcpkg's toolchain with MSVC 17(Visual Studio 2022 Preview, host amd64, targeting amd64), the executable works (in pwsh7) as below:
My vcpkg OpenCV installed features (also build with Visual Studio 2022 Preview):
C++ source file:
CMakeLists.txt
The extra CMake options I used when building this demo are:
Beta Was this translation helpful? Give feedback.
All reactions