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

Unable to link Qt application compiled with the Embedded Profiler DLL

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • Not Evaluated
    • None
    • 5.2.0
    • None
    • Windows 7 x64 SP1, Qt 5.2.0, MinGW 4.8, Embedded Profiler 1.2.1.

    Description

      I get linker error when I try to build an application that uses Embedded Profiler DLL and is linked with it.
      The linker says:

      debug/main.o: In function `load<int>':
      C:\Qt\projects\build-eproftest3-Desktop_Qt_5_2_0_MinGW_32bit-Debug/../../5.2.0/mingw48_32/include/QtCore/qbasicatomic.h:142: undefined reference to `int QGenericAtomicOps<QBasicAtomicOps<4> >::load<int>(int const&)'
      debug/main.o: In function `load<int>':
      C:\Qt\projects\build-eproftest3-Desktop_Qt_5_2_0_MinGW_32bit-Debug/../../5.2.0/mingw48_32/include/QtCore/qgenericatomic.h:96: undefined reference to `int QGenericAtomicOps<QBasicAtomicOps<4> >::load<int>(int const&)'
      collect2.exe: error: ld returned 1 exit status
      

      If I add

      QMAKE_CXXFLAGS += -finstrument-functions-exclude-function-list=load,store
      

      to my project file, the application is built succesfully.

      It has something to do with QString constructors and shared copies counting, because the linker fails after I construct QString in my code. If I do not construct QString, the linker does not complain.
      In more complex projects, the linker complains also on loadAcquire and storeRelease calls.

      Attachments

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

        Activity

          People

            thiago Thiago Macieira
            azarubkin Alexandr Zarubkin
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes