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 typ
What worked for me:
Generally whenever I encounter an error like this, this is one of the first things I do as it solves a lot of problems with Qt.
Edit: This will of course reset your project build location.
The problem has been solved.
The cause of the problem was when creating a new project (GUI
or Console
), all source files that belong to this new project take a wrong extension ex: main.cp
, but the correct extension is supposed to be ex: main.cpp
.
And when change all the source files extension from .cp
to .cpp
worked fine.
Or change the default source file extension from [Tools -> Option -> C++].