PDA

View Full Version : Permission denied error during linking



bashamehboob
15th April 2006, 07:20
hai ,

what's my problem is close one form and open another after some time interval.
i have written following code as follows.



#include "ui_Screen3.h"
#include "ui_Screen5.h"
#include <QApplication>
#include <QObject>
#include <QTableWidgetItem>
#include <QTableWidget>
#include <QTimer>

int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QWidget *window = new QWidget;
QWidget *window1 = new QWidget;
QTimer *timer = new QTimer;
Ui::Form1 ui;
Ui::Form ui1;
ui.setupUi(window);
ui1.setupUi(window1);

window1->show();


QObject::connect(timer, SIGNAL(timeout()), window1, SLOT(hide()));
timer->start(1000);
QObject::connect(window1, SIGNAL(hide()), window, SLOT(show()));
return app.exec();
}


i was gettting following error

C:\Qt\new>make
mingw32-make -f Makefile.Release
mingw32-make[1]: Entering directory `C:/Qt/new'
g++ -c -O2 -O2 -frtti -fexceptions -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_D
LL -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN
-I"C:/Qt/4.1.1/include/QtCore" -I"C:/Qt/4.1.1/include/QtGui" -I"C:/Qt/4.1.1/inc
lude" -I"." -I"C:/Qt/4.1.1/include/ActiveQt" -I"release" -I"." -I"C:/Qt/4.1.1/mk
specs/win32-g++" -o release\main.o main.cpp
main.cpp:33:6: warning: no newline at end of file
g++ -mthreads -Wl,-enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runt
ime-pseudo-reloc -Wl,-s -Wl,-s -Wl,-subsystem,windows -o "release\new.exe" relea
se\main.o -L"C:\Qt\4.1.1\lib" -lmingw32 -lqtmain -lQtGui4 -lQtCore4
C:\MinGW\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\ mingw32\bin\ld.exe: cannot ope
n output file release\new.exe: Permission denied
collect2: ld returned 1 exit status
mingw32-make[1]: *** [release\new.exe] Error 1
mingw32-make[1]: Leaving directory `C:/Qt/new'
mingw32-make: *** [release] Error 2



please help give me any clue to go forward.

bye
basha:)

Brandybuck
15th April 2006, 07:46
The error says you have a permission problem. Check that you don't already have a release\new.exe file, and that if you do, it is not read-only.

jacek
15th April 2006, 13:02
Make sure that your application isn't running when you link a new version.