Precompiled headers with DLL solutions. Cannot open precompiled header file

后端 未结 4 1375
无人及你
无人及你 2021-02-15 02:11

This worked without error when this solution worked off of .lib files instead of .dll files.

I have all of my projects except one currently using a precompiled header,

相关标签:
4条回答
  • 2021-02-15 02:18

    Try rebuilding your project in a new, copying only the files needed supplies.

    0 讨论(0)
  • 2021-02-15 02:27

    LudoSound.pch was not regenerated. Delete only the folder it was in and build again.

    0 讨论(0)
  • 2021-02-15 02:28

    Are you using "automatically generate", or "use precompiled header" on the project and "create precompiled header" on the one cpp file? The latter is more efficient, but I've seen the per-file configuration on projects get accidentally reset, so that the "stdafx.cpp" (or whatever) file no longer generates the precompiled header.

    0 讨论(0)
  • 2021-02-15 02:37

    I had this issue after I deleted and re-added stdafx.cpp from & to my project. Solution:

    • stdafx.cpp needs to have the property Create PrecompiledHeader (/Yc), this sets stdafx.cpp as the one that is responsible for creating the .pch from stdafx.h
    • the project (and with that all the files in it) can have the property Use PrecompiledHeader (/Yu), they can use .pch created by the compilation of stdafx.cpp
    0 讨论(0)
提交回复
热议问题