Access denied when building a project

≯℡__Kan透↙ 提交于 2020-01-15 12:43:13

问题


I’m working on a project with opencv lib. I use Qt 4.8 on Windows 7 and it gives me an error when building the project:

 mingw32-make.exe[1]: *** Access is denied.
 . Stop.
 mingw32-make.exe: *** [release] Error 2
 19:05:06: The process "F:\QtSDK\mingw\bin\mingw32-make.exe" exited with code 2.
 Error while building project TraySystemtry (target: Desktop)
 When executing build step 'Make'

The pro file:

    QT += xml svg core gui

CONFIG += qt

VERSION = 0.3.0

TEMPLATE = app

INCLUDEPATH += D:\OpenCV\opencv\build\include

LIBS += -LD:\OpenCV\opencv_Build\bin\
    -lopencv_core242 \
    -lopencv_highgui242 \
    -lopencv_imgproc242 \
    -lopencv_features2d242 \
    -lopencv_calib3d242 \
    -lopencv_objdetect242

HEADERS += \
    window.h \
    aboutus.h \
    abouttab.h \
    developertab.h \
    privacytab.h \
    classificationhand.h \
    keyssetup.h

SOURCES += \
    window.cpp \
    main.cpp \
    aboutus.cpp \
    abouttab.cpp \
    developertab.cpp \
    privacytab.cpp \
    classificationhand.cpp \
    keyssetup.cpp

RESOURCES += \
    systray.qrc

I can’t figure out the problem.


回答1:


There are at least two possible causes:

  1. The file you're trying to build is open/used (the program is running)
  2. You don't have sufficient privileges (you don't have admin rights)

Cause #1 is often more likely than cause #2.




回答2:


I have the same problem. For mine, I resolved it just disabling the antivirus (Kaspersky). The antivirus was denying mingw32-make.




回答3:


For me it usually means that the exe that I'm trying to compile is currently open (i.e., running). This often happens when I have it running in debug mode, then try to recompile.



来源:https://stackoverflow.com/questions/17153187/access-denied-when-building-a-project

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!