在 VS 2005 中构建 RAPI.h,打开包含文件失败
这听起来可能太简单了,但我错过了一些东西。我需要使用 C++ 编写 RAPI Windows 控制台应用程序。我目前使用的是VS2005。我已经根据文档创建了一个全新的空 Windows Consol 应用程序“MyTestRAPI”,我知道我需要包含“RAPI.H”文件。因此,我尝试过
#include <rapi.h>
编译并
#include "rapi.h"
得到以下
致命错误 C1083:无法打开包含文件:'rapi.h':没有这样的文件或目录
所以,然后我转到“项目”菜单,“属性” ”。在树视图上的“公共属性”-> “引用”,我转到右下角并单击“添加路径”,并包含 rapi.h 文件和其他 .h 文件所在的显式路径...在本例中为
“C:\Program Files\Windows CE Tools\wce500\Windows Mobile 5.0 Pocket PC SDK\Activesync\Inc”,
其中包括 14 个 .h 文件
保存/构建项目,但仍然编译错误...
所以,我将 #include 更改为
#include "C:\Program Files\Windows CE Tools\wce500\Windows Mobile 5.0 Pocket PC SDK\Activesync\Inc\rapi.h"
这次,它发现 THIS include ,但无法在 rapi.h 中找到 #includes,该文件也位于同一文件夹中。
我错过了什么似乎让我困惑。
谢谢
this may sound too simple, but I'm missing something. I need to write a RAPI Windows Console app using C++. I'm currently using VS2005. I've created a brand new empty Windows Consol app "MyTestRAPI" from documentation, I know I need the include of the "RAPI.H" file. So, I've tried as
#include <rapi.h>
and also by
#include "rapi.h"
I compile and get the following
fatal error C1083: Cannot open include file: 'rapi.h': No such file or directory
So, I then go to menu for "Project", "Properties". On the treeview for "Common Properties" -> "References", I go to the lower right and click on "Add Path", and include the explicit path where the rapi.h file and other .h files are located... in this case
"C:\Program Files\Windows CE Tools\wce500\Windows Mobile 5.0 Pocket PC SDK\Activesync\Inc"
which include 14 .h files
Save / build the project, and still compile error...
So, I change the #include to
#include "C:\Program Files\Windows CE Tools\wce500\Windows Mobile 5.0 Pocket PC SDK\Activesync\Inc\rapi.h"
This time, it finds THIS include, but fails on finding the #includes within the rapi.h which also reside in the same folder.
What is it that I'm missing that appears to elude me.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
“共同属性”-> “References”字段指的是.NET 程序集引用。
要添加C++#include搜索路径的路径,需要使用“配置属性”-> “C/C++”-> “一般”-> “附加包含目录”。
The "Common Properties" -> "References" field refers to .NET assembly references.
To add a path to the C++ #include search path, you need to use "Configuration Properties" -> "C/C++" -> "General" -> "Additional Include Directories".