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
Forum Updated to NodeBB v4.3 + New Features

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 725 Views 1 Watching
  • 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 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
    • Christian EhrlicherC Online
      Christian EhrlicherC Online
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on 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 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.

        Christian EhrlicherC 1 Reply Last reply
        1
        • V vaultnerd

          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.

          Christian EhrlicherC Online
          Christian EhrlicherC Online
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on 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

          • Login

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