Important: Please read the Qt Code of Conduct -

Building libraries from sources.

  • I recently started using Qt instead of Visual Studio and some other library. In my application I need to use tidy library, which I previously downloaded and used successfully.
    I have this lib built for Visual Studio, but linking it in Qt produces multiple undefined reference errors, so I assume I have to build it again with different settings. I have very little experience with building libraries and my understanding of CMake is very shallow. Could you point me in the right direction what should I do? Can I build this library using QtCreator or should I use CMake? Which generator should I use? My Qt uses MinGW, so I think MinGW Makefiles is a good option?

    Thanks for any help and sorry if my questions are very basic, but despite writing code for few years I never got into technical issues of this process.

  • @frogi16

    Hi and welcome in devnet forum

    In most cases MinGW compiled and Visual Studio libraries are not compatible. The object structure and naming is different and therefore the linker cannot find the proper modules.

    Therefore, you have the choice of downloading Qt pre-compiled for your VS compiler, if it is available or to recompile your external library with MinGW tool chain. mingw32-make.exe shall be available in the bin folder of your MinGW installation.

Log in to reply