Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Qt + MingW: No found libraries in path



  • I'm developing a cross-platform Qt application and I would like to switch from MSVC++ Compiler to MingW-x64 compiler.
    So, I uninstall Qt completely, and downloaded a new one.
    In the installation process, I check both MSVC 2017 and MingW-x64 (Qt and Tools options)

    Finally, I opened my Qt project and tried to compile using the MingW-x64 configuration, but in this case I got a compilation errors saying:

    error: imslcmath.lib: No such file or directory
    error: imslcmath_dll.lib: No such file or directory
    error: imslcmath_imsl.lib: No such file or directory
    error: imslcmath_imsl_dll.lib: No such file or directory
    error: imslcstat.lib: No such file or directory
    error: imslcstat_dll.lib: No such file or directory
    error: imslcstat_imsl.lib: No such file or directory
    error: imslcstat_imsl_dll.lib: No such file or directory
    

    But, if I switch back to the MSVC configuration, it builds and works fine! No errors!

    Why MingW-x64 configuration is not founding my libraries?
    Here is part of my *.pro file:

    win32 {
        # HDF5:
        LIBS += -L"C:\Program Files\HDF_Group\HDF5\1.10.5\lib" libhdf5.lib libhdf5_hl.lib libszip.lib libzlib.lib
    
        # IMSL:
        LIBS += -L"C:\Program Files (x86)\RogueWave\imsl\cnl-2019.0.0\winms190x64\lib" imslcmath.lib imslcmath_dll.lib imslcmath_imsl.lib imslcmath_imsl_dll.lib imslcstat.lib imslcstat_dll.lib imslcstat_imsl.lib imslcstat_imsl_dll.lib
    }
    

    Here is my IMSL library folder:
    folder.png

    Another observation:
    As you can see in the *.pro file I'm using 2 libraries:

    • HDF5
    • IMSL

    I got no errors about HDF5 and I got errors in the IMSL. Why?

    My Setup:
    Windows 10 x64
    Qt Creator IDE 4.11.1
    Qt 5.14
    MingW-x64 7.3.0

    folder.png


  • Lifetime Qt Champion

    @fem_dev The import libraries for MSVC and MinGW are not compatible. You might need to update your dependencies to be compatible with MinGW. Some libs can not be used at all - blame the library authors.

    Edit:

    LIBS += -L"C:\Program Files\HDF_Group\HDF5\1.10.5\lib" libhdf5.lib libhdf5_hl.lib libszip.lib libzlib.lib

    That is not correct. Correct is:

    LIBS += -L"C:\Program Files\HDF_Group\HDF5\1.10.5\lib" -lhdf5 -lhdf5_hl -lszip -lzlib

    Also, avoid spaces in path names.
    Regards


  • Lifetime Qt Champion

    @fem_dev The import libraries for MSVC and MinGW are not compatible. You might need to update your dependencies to be compatible with MinGW. Some libs can not be used at all - blame the library authors.

    Edit:

    LIBS += -L"C:\Program Files\HDF_Group\HDF5\1.10.5\lib" libhdf5.lib libhdf5_hl.lib libszip.lib libzlib.lib

    That is not correct. Correct is:

    LIBS += -L"C:\Program Files\HDF_Group\HDF5\1.10.5\lib" -lhdf5 -lhdf5_hl -lszip -lzlib

    Also, avoid spaces in path names.
    Regards


Log in to reply