[Interest] QFile + resource + DLL = weird problem
Alexander Dyagilev
alervdvcw at gmail.com
Sun Jun 21 00:06:15 CEST 2020
Hello,
My app consist of serveral binaries. Main binary uses some DLLs. One of
DLLs has resources inside of it. It uses them for its own purposes.
I read resources inside of the DLL using this code:
QFilef(":/promise.js");
Q_ASSERT(f.exists());
if(!f.open(QFile::ReadOnly))
returnerrorFrom(f,__SRCLINE__);
autob=QString::fromUtf8(f.readAll());
mylogex("promise.js:"<<b);
We build our app using Jenkins (via script which uses "qmake
project.pro" command).
All is working fine.
The weird problem is that today I've tried to build Release
configuration on my PC. And it does NOT work! QFile::readAll returns an
empty buffer.
It works in Debug configuration. If I replace the DLL built on my PC
with the one built using Jenkins - it works too.
What is going on??
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20200621/3b23a2ab/attachment.html>
More information about the Interest
mailing list