https://bugs.kde.org/show_bug.cgi?id=364820
Bug ID: 364820 Summary: No Link to libstdc++ on MSYS on Windows (And Linking Issues) Product: frameworks-karchive Version: unspecified Platform: Other OS: MS Windows Status: UNCONFIRMED Severity: normal Priority: NOR Component: general Assignee: fa...@kde.org Reporter: ahusz...@gmail.com CC: kdelibs-b...@kde.org Environment: MSYS2, a Unix-like subsystem for Windows using a .dll rather than .so to allow the creation of binaries for deployment. Packages installed: pacman -Sy cmake pacman -Sy mingw-w64-x86_64-qt5-static Build Issues: After installing cmake-extra-modules, which occurs without issues, I then issued the following command, which completes successfully: ``` cmake .. \ -DCMAKE_BUILD_TYPE=debug \ -DCMAKE_INSTALL_PREFIX=/mingw64 ``` Then, I issued: ```make VERBOSE=1``` This raises a large number of errors stating: undefined reference to `operator new` This would demonstrate that libstdc++ is not in the linking path for the build command. I tried editing the CMakeLists.txt with the following: if (MSYS) set(cmake_cxx_flags, "${cmake_cxx_flags} -lstdc++") endif() Although this does add libstdc++ to the linking path, it does not solve the issue, since -lstdc++ is not added to the end of the linking path. Manually running all the failed Makefile commands, with "-lstdc++" appended to the end allows KArchive to compile fine. Other Issue: After installing, I have to issue "ln -s /path/to/libKF5Archive.so /path/to/libKF5Archive.dll", since KArchive also incorrectly assumes I am using a Unix build system. Although the library is in fact a DLL, I cannot delete either the .so or the .dll (if I use a redundant copy) without having linking issues. Reproducible: Always Steps to Reproduce: 1. Install MSYS2 2. Install cmake and Qt5 from pacman via `pacman -Sy cmake mingw-w64-x86_64-qt5-static` 3. Install cmake-extra-modules 4. Clone karchive, cmake and build Actual Results: Produces a long ttraceback stating: undefined reference to `operator new` Expected Results: Expected it to compile without issue. The software should link to libstdc++. -- You are receiving this mail because: You are watching all bug changes.