Using precompiled headers, arent file headers expected, expected?

Visual Studio C ++ lib project The project is configured to use precompiled headers stdafx.cpp installed to create a precompiled header

I have a header file, MyClass.h If I build, then make a change to MyClass.h that should not compile, compilation will still succeed. If I recreate or if I make changes to the cpp file, which includes "MyClass.h", then the compilation will fail, as expected.

Is this expected because I'm using precompiled headers? Is there a way to fix this, so the 2nd buid raises the header changes without disabling the precompiled headers?

+3
source share
4 answers

Make sure the header file you are editing refers to your project in Solution Explorer. If so, the full assembly should start when it is changed.

+3
source

In the project properties, set the Enable Minimum Rebuild option to None.

+2
source

, stdafx.cpp , ?

0

VisualStudio . , , .

, , , . , . .

, , VS, , . , . - , , (, ). "" .

I have noted this several times without the need for a header, which is contained in a precompiled header. This seems somewhat random, but another general correlation is that the header is filled with templates. VS are just lagging patterns.

0
source

Source: https://habr.com/ru/post/1772655/


All Articles