Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
Qt for MCUs 2.7
-
None
Description
In the attached project, there are two almost identical ListView in CustomListView1.qml and CustomListView2.qml.
When you build this project with Qt for MCUs 2.7(I've tested 2.7 mingw and msvc), you'll see this link error.
C:/Qt/Tools/mingw1120_64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/ListViewQsTrLinkError.dir/CMakeFiles/ListViewQsTrLinkError.dir/CustomListView2.cpp.obj: in function `listview_model_0_word_binding()': C:/Users/81808/build-ListViewQsTrLinkError-Qt_for_MCUs_2_7_Desktop_32bpp_MINGW-Debug/CMakeFiles/ListViewQsTrLinkError.dir/CustomListView2.cpp:62: multiple definition of `listview_model_0_word_binding()'; CMakeFiles/ListViewQsTrLinkError.dir/CMakeFiles/ListViewQsTrLinkError.dir/CustomListView1.cpp.obj:C:/Users/81808/build-ListViewQsTrLinkError-Qt_for_MCUs_2_7_Desktop_32bpp_MINGW-Debug/CMakeFiles/ListViewQsTrLinkError.dir/CustomListView1.cpp:62: first defined here C:/Qt/Tools/mingw1120_64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/ListViewQsTrLinkError.dir/CMakeFiles/ListViewQsTrLinkError.dir/CustomListView2.cpp.obj: in function `listview_model_1_word_binding()': C:/Users/81808/build-ListViewQsTrLinkError-Qt_for_MCUs_2_7_Desktop_32bpp_MINGW-Debug/CMakeFiles/ListViewQsTrLinkError.dir/CustomListView2.cpp:70: multiple definition of `listview_model_1_word_binding()'; CMakeFiles/ListViewQsTrLinkError.dir/CMakeFiles/ListViewQsTrLinkError.dir/CustomListView1.cpp.obj:C:/Users/81808/build-ListViewQsTrLinkError-Qt_for_MCUs_2_7_Desktop_32bpp_MINGW-Debug/CMakeFiles/ListViewQsTrLinkError.dir/CustomListView1.cpp:70: first defined here collect2.exe: error: ld returned 1 exit status
In the generated .cpp files, there is indeed a conflict.