Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-30228

qmake adds wrong lib to vcxproj file

    XMLWordPrintable

Details

    Description

      in the lib directory are the two files located:

      halconcpp.lib
      halconcpp10.lib
      

      qmake generates the vcxproj file with

      LIBS += halconcpp.lib
      

      to

      <AdditionalDependencies>...;halconcpp10.lib;...</AdditionalDependencies>
      

      the reason for this is following bug in winmakefile.cpp:

      int ver = findHighestVersion((*dep_it).local(), file);
      

      this line is active for the -l option and also without the -l

      the only two solutions to this are

      • prepending the whole path for the lib (ignoring the QMAKE_LIBDIR)
      • CONFIG += no_versionlink

      no_versionlink is in no documentation mentioned. you'd have to find out by searching the code or visiting some "inside qmake" resource on the web.

      what the docs have to say about this is:

      Note: On Windows, specifying libraries with the -l option, as in the above example, will cause the library with the highest version number to be used; for example, libmath2.lib could potentially be used instead of libmathlib. To avoid this ambiguity, we recommend that you explicitly specify the library to be used by including the .lib file name suffix.

      this is plain wrong as I stated above

      see also https://bugreports.qt-project.org/browse/QTBUG-15596

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              jbornema Joerg Bornemann
              soukupmi Michael Soukup
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes