Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Qt and LNK1104 cannot open file

Tags:

qt

qt4

I am trying to accomplish the "hello world" tutorial with Qt 5.0.2 for Windows 64-bit (VS 2012, 500 MB) (Info). However when I press Run the project I have an LNK1104: cannot open file 'debug/Hello.exe' error. However I see that this file is created under project folder "F:\QT\Hello\build-Hello-Desktop_Qt_5_0_2_MSVC2012_64bit-Debug". Thank you in advance

Main.cpp

#include <QApplication>
#include <QPushButton>

int main(int argc, char **argv)
{
    QApplication app (argc, argv);

    QPushButton button;
    button.setText("Hello world !");
    button.setToolTip("heheheheheheheh");
    button.show();

    return app.exec();
}

Hello.pro

TEMPLATE = app
TARGET = Hello

QT = core gui
QT += widgets

SOURCES += \
    main.cpp
like image 229
Jim Avatar asked Jun 01 '13 16:06

Jim


1 Answers

Most likely cause for the problem: .exe file of your program is still running. Check with Task Manager.End this process from task manager and again try to built it.It will definitely run.

like image 125
Naresh Avatar answered Oct 08 '22 07:10

Naresh