gocv
gocv copied to clipboard
exit status 3221225794
gocv is not running after installation.
Description
I'm using 64-bit windows 10. After following steps on the installation guide my installation doesn't run.
Steps to Reproduce
-
chdir %GOPATH%\src\gocv.io\x\gocv
-
go run cmd\version\main.go
is giving meexit status 3221225794
Your Environment
- Operating System and version: Windows 10 64-bit
- OpenCV version used: 4.4
- How did you install OpenCV? I ran
chdir %GOPATH%\src\gocv.io\x\gocv
andwin_build_opencv.cmd
- GoCV version used: 0.24
- Go version: go1.15.2 windows/amd64
- Did you run the
env.sh
orenv.cmd
script before trying togo run
orgo build
? no - MinGW-W64: 7.3
- Added system paths
C:\Program Files\mingw-w64\x86_64-7.3.0-posix-seh-rt_v5-rev0\mingw64\bin
C:\opencv\build\bin
C:\opencv\build\install\x64\mingw\bin
Try to remove C:\opencv\build\bin
from PATH and leave just C:\opencv\build\install\x64\mingw\bin
. Or just swap them to mingw/bin
be in front of the other.
I've tried removing C:\opencv\build\bin
from PATH and putting it back in after mingw\bin
. Both didn't fix the issue.
I'm getting the same exit status when running the version check. I'll I could find on it was Code 3221225794 - The application failed to initialize properly. Indicates that the application has been launched on a Desktop to which current user has no access rights. Another possible cause is that either gdi32.dll or user32.dll has failed to initialize.
Usually this type of error is from installing in a non-standard location. See https://github.com/hybridgroup/gocv#custom-environment-2
Usually this type of error is from installing in a non-standard location. See https://github.com/hybridgroup/gocv#custom-environment-2
I installed everything to their default locations, in that I didn't change any paths when installing any of the required setup. The opencv folder locations match the one shown in that URL. I'm going to remove everything and reinstall from scratch and hope that any possible residual files that are left don't complicate things even more. I'll update here if it works 👍
Update: I removed everything I had previously installed (realized I had OpenCV installed for Visual Studio 2019 so removed all of that as well) and ran through the install instructions again. All worked this time.
Someday I hope to be able to compile/link using VS toolchain, but there are Go CL still pending in order to even start on that.
@UncleMarvo Did you remove visual studio entirely or just OpenCV from it?
I've tried removing Visual Studio 2017 and it didn't fix the issue. I'll try removing everything and try reinstalling without Visual Studio 2017.
I removed everything and installed it back except Visual Studio. But still same error. 😔
I didn't remove VS 2019, I just removed everything related to OpenCV that I had installed as part of the gocv install and as part of the VS 2019 OpenCV install. I deleted the opencv folder on C: drive, unistalled cmake, uninstalled tdm64-gcc (I think this was part of the VS install), deleted mingw-w64. I removed all references to any OpenCV stuff in the system paths. Then I followed the install instructions for gocv. I hope that helps.
Yay thanks @UncleMarvo. It did work after reinstalling everything. My system worked after removing tdm64-gcc. Whoever runs into this issue in the future try removing tdm64-gcc.
@theTulga Glad it helped.
anyone having this issue. just reboot your system. after had this issue, i did 'nothing' but reboot and it worked. hope this helpful
I also restart the system and it will be normal
Try to remove
C:\opencv\build\bin
from PATH and leave justC:\opencv\build\install\x64\mingw\bin
. Or just swap them tomingw/bin
be in front of the other.
It works for me. Thank you!