I was using Qt Creator on my Windows11 virtual machine,and I cloned my team's repository from github.I did no changes to it at all, and when I tried to build it reports error.
I asked my teammates to try building it, and they all finished the build without any problem. Confusingly I uninstalled the Qt and install it again. This time it works, but when I pulled the latest version with git, It reports the error again.
`:-1: error: [Makefile.Debug:102: debug/ChineseCheckers_resource_res.o] Error 1`
I wonder what on earth was wrong.
More info:
My teammates are using windows11 too. Their Qt Creator reports no error.
I have tried to delete build-ChineseCheckers-Desktop_Qt_6_2_4_MinGW_64_bit-Debug
folder, or simply delete ChineseCheckers.pro.user
, but none of these worked.
The files are stored in an USB device.
It reports error after I pulled from github and build.
CodePudding user response:
Delete all the Qt generated files, including hidden files, i.e., .uics, .objs, .mocs from the project directory.
Don't delete your project's .pro file, but delete all Qt generated hidden files and directories. I had similar issues and found that rebuilding the project completely put things back in sync.
CodePudding user response:
I have solved it by myself. The file "logo.ico" is missing. It seems that my teammates forget to upload that image, so it can be built on their machine, but mine failed. :/
Besides, I moved the file from USB device to the desktop, but I think that's not the point. Anyway, at least one of these works.