cpp-qt-live-coding icon indicating copy to clipboard operation
cpp-qt-live-coding copied to clipboard

Compilation issue with Q_INIT_RESOURCE

Open nsnavare opened this issue 6 years ago • 3 comments

Hello,

I just downloaded the source code and tried to compile according to the instructions in your video tutorial.

An error occurs while compiling the project. Its something regarding Q_INIT_RESOURCE. In the macro defined in qglobal.h, it tries to paste the "livewindow" argument and I probably think that's where the issue lies. Also, I am not sure but can you please check whether it should be livewindow or livecodingpanel and the resource as LiveCodingPanel.qml? Please refer to the attached file for the screenshot.

Thanks a lot.

init_resource_error

nsnavare avatar Sep 10 '19 16:09 nsnavare

You can try this.

inline void initMyResource() { Q_INIT_RESOURCE(qml); } QString LiveWindow::loadLiveWindow() { // Q_INIT_RESOURCE(qml); initMyResource(); return QStringLiteral("qrc:/com/machinekoder/live/LiveWindow.qml"); }

happydpc avatar Oct 21 '19 11:10 happydpc

Hello,

Thank you so much for this. The project has compiled successfully now.

I will now test out the features and get back in case of an issue.

Thank you so much once more.

Warm regards,

Nikhil

On Mon, Oct 21, 2019 at 4:32 PM happydpc [email protected] wrote:

You can try this.

inline void initMyResource() { Q_INIT_RESOURCE(qml); } QString LiveWindow::loadLiveWindow() { // Q_INIT_RESOURCE(qml); initMyResource(); return QStringLiteral("qrc:/com/machinekoder/live/LiveWindow.qml"); }

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/machinekoder/cpp-qt-live-coding/issues/1?email_source=notifications&email_token=AAHDBFMSYP2ZAOQQUOG2ZQ3QPWD4HA5CNFSM4IVJV42KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBZ5ZXA#issuecomment-544464092, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHDBFPDUROI6B43LDSQ5ZTQPWD4HANCNFSM4IVJV42A .

nsnavare avatar Oct 21 '19 14:10 nsnavare

Does this work with>>>
Qt Creator 12.0.1 Based on Qt 6.6.0 (GCC 10.3.1 20210422 (Red Hat 10.3.1-1), x86_64)

grantrostig avatar Feb 22 '24 18:02 grantrostig