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. Error 3668 when building QT Application against QT 5.11 with Visual Studio 2015
QtWS25 Last Chance

Error 3668 when building QT Application against QT 5.11 with Visual Studio 2015

Scheduled Pinned Locked Moved Solved General and Desktop
visual studiopreprocessor
4 Posts 2 Posters 628 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.
  • V Offline
    V Offline
    vaultnerd
    wrote on 4 Dec 2019, 04:17 last edited by
    #1

    I have a bit of an odd situation happening. I've built QT on Windows under VS2015. The problem comes when I try to build my application against my QT install. For some odd reason I'm getting an error in the header files of the QT install:

    c:\path\to\qt\install\include\QtCore/qfiledevice.h(103): error C3668: 'QFileDevice::_close': method with override specifier 'override' did not override any base class method

    I looked around a bit and and in particular I looked at the pre-proccessor output. It seems that the VS2015 pre-processor is changing

    virtual void close() override;
    

    to

    virtual void _close() override;
    

    in the QFileDevice class definition from qfiledevice.h. Technically I guess that explains the 3668 error, since there is no _close() in the QIODevice class, just virtual void close();

    So what I'm wondering is, has anyone seen behavior like this where the pre-processor just decides to change a method name in a header for seemingly no reason, or even better, just run in to this error when using QT 5.11 with Visual Studio 2015?

    If it helps I built my QT install with -static and -static-runtime, not sure why that would make a difference in this case though. It's also probably worth noting I'm normally launching this build with a call to nmake against a qmake generated Makefile.

    Any help on this would be greatly appreciated.

    1 Reply Last reply
    0
    • C Offline
      C Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on 4 Dec 2019, 06:00 last edited by
      #2

      You somehwere have a define which changes 'close' to '_close' - fix it.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      3
      • V Offline
        V Offline
        vaultnerd
        wrote on 4 Dec 2019, 15:11 last edited by
        #3

        I'm going to just chalk this up to sleep deprivation. You hit the nail on the head, one of our headers was causing the damage. Thanks for the help.

        C 1 Reply Last reply 4 Dec 2019, 15:28
        1
        • V vaultnerd
          4 Dec 2019, 15:11

          I'm going to just chalk this up to sleep deprivation. You hit the nail on the head, one of our headers was causing the damage. Thanks for the help.

          C Offline
          C Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on 4 Dec 2019, 15:28 last edited by
          #4

          @vaultnerd Then please mark this topic as solved, thx.

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          1 Reply Last reply
          0

          1/4

          4 Dec 2019, 04:17

          • Login

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