MJ_Wesson
MJ_Wesson

Reputation: 31

Qt Creator: When I enable Shadow Builds, why do I get error related to missing files?

I added an image to resources, and displaying it worked fine. Then, I removed the file from resources in the Qt project, and I moved the file to a new images folder and re-added it to resources.

Now the project will only compile if "Shadow Build" option is un-checked in build settings.

If Shadow Build is enabled, I receive an error,

"No rule to make target '../--project_name--/--image_name--', needed by 'debug/qrc_qml.cpp'. Stop."

where --project_name-- is the name of my project, etc.

This error doesn't make much sense, considering the file no longer exists at that location. What's going on here?

Upvotes: 0

Views: 796

Answers (1)

MJ_Wesson
MJ_Wesson

Reputation: 31

The answer is to run qmake. This can be done from Build->run qmake. Qmake regenerates makefiles, which 'build' and 'build all' do not. The problem is that references to the file at its old location were not being removed by rebuilding. Credit to Andrii for pointing to answer in comment above.

Upvotes: 1

Related Questions