Details
-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
Qt for MCUs 2.5
-
None
Description
I'm not sure if this is an intended error or not, but one thing I'm sure is that cusomers may encounter this in the real project and get confused.
First of all, here is the error message:
:-1: error: qmlproject/libLib_Issue_Custom1ec7.a(CustomButton.cpp.obj):CustomButton.c:(.rdata$.refptr.qul_rasterBuffer_icon_7162666536225782163_handle[.refptr.qul_rasterBuffer_icon_7162666536225782163_handle]+0x0): undefined reference to `qul_rasterBuffer_icon_7162666536225782163_handle'
I attached the minimal project which reproduces the issue. (tested with Qt for MCUs 2.5 Desktop MINGW)
The condition seems to be :
- The project has a sub module (another .qmlproject)
- Both the root project and the subproject has the same image stored in the same relative paths. In the example above, it's "images/icon.png" and refered to as "icon.png" in the code.
*By the way, specifying "MCU.prefix" to change the name the QML file refers to resolves this issue. For example, if I set "MCU.prefix: assets" and write the code like this in issue.qml, the error didn't show:
// issue.qml. This works. Image { anchors.centerIn: parent source: "assets/icon.png" // <-- instead of 'source: "icon.png"' just like in the CustomButton.qml. }
3. If the fine names are the same, the file contents don't need to be the same. In the sample above, the image in the root project is a Qt for MCUs icon, whereas the image in the subproject is a dog.
If this is an intended error, we should probably tell the user when cmake ran, saying a message like "you cannot have the image files with the same name in the same relative paths. We detected there's "images/icon.png" at the issue.qmlproject and "images/icon.png" at the CustomModule.qmlproject." (By the way, this message may not capture the issue perfectly so please take this with a grain of salt.)
Or, if this is not intended, this should be treated as a bug and get fixed.