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

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

问题描述

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

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

我有我所有的项目,除了一个目前使用预编译头,无错误。预编译头称为 LudoGlobal.h 。我想最后一个项目,这个预编译头(它存在于一个单独的,核心,项目)链接,但我得到了以下错误:

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:

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

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?

我意识到LudoSound.pch不存在。我的假设下,它可能被创建时LudoSound编译,YESNO?

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

推荐答案

或使用预编译头项目和创建预编译头在一个cpp文件?后者是更有效,但我已经看到了项目的每个文件中的配置因意外复位,使stdafx.cpp(或其他)文件不再生成预编译头。

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天全站免登陆