The following issue has been SUBMITTED. ====================================================================== http://public.kitware.com/Bug/view.php?id=15103 ====================================================================== Reported By: Hendrik Sattler Assigned To: ====================================================================== Project: CMake Issue ID: 15103 Category: CMake Reproducibility: always Severity: major Priority: normal Status: new ====================================================================== Date Submitted: 2014-08-25 06:25 EDT Last Modified: 2014-08-25 06:25 EDT ====================================================================== Summary: AUTORCC fails with more than one .qrc file per target Description: Using VisualStudio 2010.
9> qrc_icons.cpp 9> qrc_moreicons.cpp 9>qrc_moreicons.obj : error LNK2005: "int __cdecl qInitResources(void)" (?qInitResources@@YAHXZ) already defined in qrc_moreicons.obj 9>qrc_moreicons.obj : error LNK2005: "int __cdecl qCleanupResources(void)" (?qCleanupResources@@YAHXZ) already defined in qrc_moreicons.obj 9>qrc_moreicons.obj : error LNK2005: "class qCleanupResources__dest_class__ qCleanupResources__dest_instance__" (?qCleanupResources__dest_instance__@@3VqCleanupResources__dest_class__@@A) already defined in qrc_moreicons.obj Steps to Reproduce: set ( CMAKE_AUTORCC ON ) and remove the qt4_add_resources() macro call. I use this on 2 shared library target and one executable and in all three cases it fails. Additional Information: Previously, _all_ .qrc file were in _one_ qt4_add_resources() macro call. The Qt rcc does automatically prepend the file base name to the symbol, so int QT_MANGLE_NAMESPACE(qInitResources_icons)() and int QT_MANGLE_NAMESPACE(qInitResources_moreicons)() instead of twice int QT_MANGLE_NAMESPACE(qInitResources)() ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2014-08-25 06:25 Hendrik SattlerNew Issue ====================================================================== -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
