qrc resources to be compiled
I'm brand new on Qt and C++ programming in general....I'm trying to generate an .exe file to run my software without having to run it through Qt.
here is how my project looks like, with the list of files and the qrc resource attached. Now, if I run the project from Qt everything is ok, but if I try to run the .exe created into the release folder I get "MAP file NOT FOUND", warning I set up in case the file is missing....any clue on why this happens and how can I fix it?
Thanks a lot in advance
Hi and welcome to devnet,
Are you getting that error message when trying to load that file from QRC ? That seems highly unlikely since the resource file is compiled in your application.
thank you for your quick reply! I do get the error when I run the application (and the project doesn't work as it should) but it works fine, and I don't get any error, if I run the project from Qt.
Just to be sure, when you say your run the exe from the release folder, are you launching it from Window's file explorer ? If so, did you properly deploy your application ?
this is what I do:
- I run my project from Qt
- the software creates the folder where it deploys the application along with all the moc_xx.cpp and the qrc_MapFile.cpp is there
- I copy the .exe from the deploy folder into the folder from where I want to launch the application
at least this is what I have successfully done with other projects but this is the first time I use a .qrc resource.
sorry for all the screenshots but hopefully would be easier to understand if I'm missing pieces...
Can you show the content of your .qrc file ?
sure! the .qrc is
and the .map file is just a list of numbers
Can you show the code where you load the file ?
qDebug()<<"MAP FILE NOT FOUND.";
Hi SGaist I solved the issue by deploying the application from the command line using the command windeployqt.exe and it works fine. thanks fro your help anyway!