Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Doubly defined symbols while porting from 5.6 to 5.9
QtWS25 Last Chance

Doubly defined symbols while porting from 5.6 to 5.9

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 289 Views
  • 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.
  • R Offline
    R Offline
    Rainer Sprengel
    wrote on 15 May 2018, 09:33 last edited by
    #1

    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
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 15 May 2018, 20:45 last edited by
      #2

      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
      0

      2/2

      15 May 2018, 20:45

      • Login

      • Login or register to search.
      2 out of 2
      • First post
        2/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved