Error trying to compile .qrc file in Resources Folder
-
I'm receiving an error saying:
[qrc_Resources_Files.cpp] Error 1
I suspect it has something to do with my compiler not recognizing the jpg images in my Resource folder.
The file error window is what I get when I try to open any of the jpg files.
This prevents me from compiling and running.
-
@AngoMango said in Error trying to compile .qrc file in Resources Folder:
The file error window is what I get when I try to open any of the jpg files.
The error message says that it was unable to read the bytes of the files, possibly because you don't have permission to open them. It's not about JPEG support.
From your console,
cd
to "/home/angaar/CS1D/GoBigOGoHome/CS1D-Project-1-Go-Big-O-Go-Home--master/College Images/"- Call
ls -l
What do you see? Who is the owner of those image files? What permissions are set in those files?
Next, try to open the files in an image viewer. Does it load correctly?
-
@JKSH /College Images is built-in, so I don't have the folder outside of the project. The only way to view the list files would be from QT. I don't think this should be a problem, because this has been tried by other people and they were able to view the images and run the program without the error just fine.
Also the image viewer gives the same File Error window.
This was taken straight from a github repository. So could the ownership of the images be the error? Should I do 'Add New Existing Files' in the Resources folder and just re-add the Resource_Files.qrc file?
-
@AngoMango said in Error trying to compile .qrc file in Resources Folder:
/College Images is built-in, so I don't have the folder outside of the project. The only way to view the list files would be from QT.
The image files must still exist on your computer somewhere. Just
cd
to the project folder that contains those images.If you can't find the files, that means you've found the problem: The files can't be opened because they don't exist!
Also the image viewer gives the same File Error window.
That means the problem is outside of Qt.
If the files are missing, then delete your project folder and re-clone the Git repo.
If the files are there but the permissions are wrong, then use a tool like
chown
to change ownership of those files: https://linuxize.com/post/linux-chown-command/this has been tried by other people and they were able to view the images and run the program without the error just fine.
Look at their project folder (using a Linux file browser or the console). See if you can spot any differences between your copy and their copy.
Should I do 'Add New Existing Files' in the Resources folder and just re-add the Resource_Files.qrc file?
No, that won't cause missing files to magically appear, and it won't fix file ownership/permissions.