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. How to avoid generated mocing file include "stdafx.h" in VS2013?
Forum Updated to NodeBB v4.3 + New Features

How to avoid generated mocing file include "stdafx.h" in VS2013?

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 1.4k 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.
  • H Offline
    H Offline
    henryli
    wrote on last edited by
    #1

    Is there any way to exclude '#incude "stdafx.h"' in generated Mocing files?

    If I get rid of this line of code in generated Mocing file. Compiling this file works. Rebuilding the project will automatically add this line of code in Mocing file again. How to set VS2013 so that '#incude "stdafx.h"' is not added in mocing file?

    1 Reply Last reply
    0
    • Chris KawaC Offline
      Chris KawaC Offline
      Chris Kawa
      Lifetime Qt Champion
      wrote on last edited by
      #2

      This setting is derived from project settings. If your project uses precompiled headers then this line will be included in the generated files. If it doesn't compile then your precompiled header setup is messed up. Go to Project -> Properties -> C/C++ -> Precompiled Headers and check your settings or disable precompiled headers if you don't want them.

      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