Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Unsolved Doubly defined symbols while porting from 5.6 to 5.9

    General and Desktop
    2
    2
    199
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Rainer Sprengel
      Rainer Sprengel last edited by

      I am porting my application from Qt version 5.6.0 (msvc2015 32Bit) to 5.9.5 (msvc2017 64 Bit).
      I have a lib which replaces the new and delete operator with my own version. In Qt 5.6 this does not led to any problem. But in Qt 5.9 this results in a linker error
      *libTracing.lib(memops.obj) : error LNK2005: "void __cdecl operator delete(void )" (??3@YAXPEAX@Z) ist bereits in MSVCRT.lib(delete_scalar.obj) definiert.
      I use qmake (and qtcreator) to build my program. I see, that the linker is called with qtmain.lib before my own libTracing.lib (this is identical in qt5.6 and qt5.9.5). If I manually put qtmain.lib after my lib the linker does not report any problem. But I can't find an option to control the sequence of qtmain and my own lib via qmake.
      What can I do in this situation?

      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        Hi,

        That's a question you should rather bring to the interest mailing list. You'll find there Qt's developers/maintainers. This forum is more user oriented.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply Reply Quote 0
        • First post
          Last post