Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Qt error: LNK1181: cannot open input file 'debug\main.obj'

Tags:

c++

qt

qt5

Qt creator was working well, but suddenly shows a problem error: LNK1181: cannot open input file 'debug\main.obj'.
This problem shows always with any type of application either GUI or console.
I've uninstall the Qt, and install again, but the problem still exists.
I did not do anything in the Qt creator settings, I left the default settings.

The following application is simple console application occur the same problem in it.

//main.cpp
#include <QCoreApplication>

int main(int argc, char *argv[]){
    QCoreApplication a(argc, argv);

    return a.exec();
}

Note: I'm using Qt 5.1.1 for Windows 32-bit (VS 2010, OpenGL).

like image 847
Lion King Avatar asked Sep 04 '13 02:09

Lion King


2 Answers

This problem also occurs if the path of your project (name of any folder) contains a white space.

like image 127
Filip Hazubski Avatar answered Sep 17 '22 17:09

Filip Hazubski


This problem occurs also if you have in the .pro or .pri files something like:

HEADERS += \ \

or

SOURCES += \ \

like image 24
Hadi Navapour Avatar answered Sep 19 '22 17:09

Hadi Navapour