Search code examples
c++cvisual-studiovisual-studio-2015precompiled-headers

Can't disable precompiled headers for single C file in VS2015


I'm trying to disable precompiled headers for the C files of my project because VS2015 gives me this error (line broken for readability):

..\..\..\..\Lib\freetype2\src\autofit\autofit.c : fatal error C1853: 
  'Y:\obj\TwoNav_PC_15\headers\CompeTwoNav.pch' precompiled header file 
  is from a previous version of the compiler, or the precompiled header 
  is C++ and you are using it from C (or vice versa)

Looking on how to do it I found this post, but when I try to do it in my Visual Studio 2015 Professional, I can't see the option referred to.

Edit: This is how I try to select the properties:

enter image description here

This image is what I see when I select the properties of the file:

File Properties dialogbox


Solution

  • I found a workaround to make the right tool I needed appear... I leave it here as an answer in case someone else encounters this problem.

    It won't appear by clicking file -> Properties, but it appears when clicking project -> Properties so, once opened, I selected the file autofit.c from the tree view and finally I could disable precompiled headers from this single file !

    enter image description here