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

前端 未结 8 1691
小蘑菇
小蘑菇 2021-01-02 02:39

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

8条回答
  •  无人及你
    2021-01-02 03:42

    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++].

    enter image description here

提交回复
热议问题