预编译头与DLL解决方案。无法打开预编译头文件 [英] Precompiled headers with DLL solutions. Cannot open precompiled header file

查看:361
本文介绍了预编译头与DLL解决方案。无法打开预编译头文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当这个解决方案解决了.lib文件而不是.dll文件时,这个工作没有错误。



我有我的所有项目,除了一个目前使用预编译头,没有错误。预编译头称为 LudoGlobal.h 。我试图将最后一个项目链接到这个预编译头(它存在于一个单独的Core)项目中,但是我收到以下错误:


错误4致命错误C1083:无法打开
预编译头文件:
'.... \Output\LudoSound\Debug\LudoSound.pch':
每个.cpp文件都没有这样的文件或
目录ludosoundmanager.cpp 1


为什么是这样?我如何解决?



我意识到LudoSound.pch不存在。我假设在LudoSound编译时可能会创建,yesno?

解决方案

您是否使用自动生成,或在项目中使用预编译头,并在一个cpp文件上创建预编译头后者更有效率,但是我已经看到项目中的每个文件配置被意外重置,以便stdafx.cpp(或任何)文件不再生成预编译头。


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, without error. The precompiled header is called "LudoGlobal.h". I am trying to link the last project to this precompiled header (which exists in a seperate, "Core", project) but I'm getting the following error:

Error 4 fatal error C1083: Cannot open precompiled header file: '....\Output\LudoSound\Debug\LudoSound.pch': No such file or directory ludosoundmanager.cpp 1

for each .cpp file. Why is this? How can I solve it?

I realize LudoSound.pch does not exist. I am under the assumption that it probably gets created when LudoSound compiles, yesno?

解决方案

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.

这篇关于预编译头与DLL解决方案。无法打开预编译头文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆