error ":: error: cannot open output file debug\assign2_9.exe: Permission denied"
My program ran about three time but when I ran it the forth time it gave the error ":: error: cannot open output file debug\assign2_9.exe: Permission denied" ":: error: collect2: ld returned 1 exit status". I did not change anything in the code. WHATS CAUSING THIS ERROR PLEASE HELP!
Re: error ":: error: cannot open output file debug\assign2_9.exe: Permission denied"
Looks like an executable was already started, but not closed.
Re: error ":: error: cannot open output file debug\assign2_9.exe: Permission denied"
Windows locks executables when they are running. When the application is running during a build the linker cannot replace the executable and fails in the fashion you describe.
Re: error ":: error: cannot open output file debug\assign2_9.exe: Permission denied"
Hello! I have a same problem. I must open every time "Task Manager" for ending task. For example, I created the simple application with a dialog:
Code:
#include "Dialog.h"
#include <QApplication>
#include <QMessageBox>
int main(int argc, char *argv[])
{
app.setApplicationName( "Single Point" );
app.setApplicationVersion( "0.1" );
#ifndef QT_NO_OPENGL
Dialog w;
w.show();
#else
QMessageBox::information( NULL,
"Error",
"OpenGL support required");
#endif
return app.exec();
}
I receive:
Quote:
error: cannot open output file debug/SinglePoint.exe: Permission denied
Re: error ":: error: cannot open output file debug\assign2_9.exe: Permission denied"
I assume you are seeing the modal message box, closing that, and having the program fall through to the main event loop. The program stays running in that case. Try this:
Code:
#include "Dialog.h"
#include <QApplication>
#include <QMessageBox>
int main(int argc, char *argv[])
{
app.setApplicationName( "Single Point" );
app.setApplicationVersion( "0.1" );
#ifndef QT_NO_OPENGL
Dialog w;
w.show();
return app.exec();
#else
QMessageBox::information( NULL,
"Error",
"OpenGL support required");
return 1;
#endif
}
Re: error ":: error: cannot open output file debug\assign2_9.exe: Permission denied"
Thank you very much for your help :D