error: LNK1181: cannot open input file ‘debug\main.obj’。无法打开输入文件"debug\main.obj"
This is most likely caused by an error in the project settings. Source files (.cpp) are compiled into object files (.o) which are then all linked together. Somehow the linker is failing to find the object files compiled from your source files. I can tell it is looking into debug, but they are being stored somewhere else. Do you have write permissions to that directory?
This problem also occurs if the path of your project (name of any folder) contains a white space.
'The error occurs because the linker in VS2015 can not find the file or the file path defined in the project properties. However, the file path or file in the properties is correct because the linker can handle space character in the file path.
To solve the issue, you just avoid to use space character in the file path or add quotation around file path in project properties.
HEADERS += \ \ XX1.h \ xx2 # OR SOURCES += \ \ XX1.cpp \ xx2.cpp \ yy.cpp