我是 C++
编程的新手,我接到的任务是接手前任员工的 Windows 移动设备编程工作。前几周我让模拟器工作,现在当我加载程序时,我得到:
Fatal error RC1015: cannot open include file "xxxx.h"
我已经尝试了几乎所有我在互联网上看到的东西,但没有一点运气。我认为我的 include 语句之一丢失了,但每次我将其中一个语句放入其中时,其他东西就会中断。请提供任何帮助,我们将不胜感激。
这是 .rc
文件的内容:
// Microsoft Visual C++ generated resource script.
//
#include "resourceppc.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"
#include "ConnectLoginDlgsRes.h"
#include "AboutDlgRes.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE
BEGIN
"resourceppc.h\0"
END
2 TEXTINCLUDE
BEGIN
"#include ""afxres.h""\r\n"
"#include ""ConnectLoginDlgsRes.h""\r\n"
"#include ""AboutDlgRes.h""\r\0"
END
3 TEXTINCLUDE
BEGIN
"#define _AFX_NO_SPLITTER_RESOURCES\r\n"
"#define _AFX_NO_OLE_RESOURCES\r\n"
"#define _AFX_NO_TRACKER_RESOURCES\r\n"
"#define _AFX_NO_PROPERTY_RESOURCES\r\n"
"\r\n"
"#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n"
"LANGUAGE 9, 1\r\n"
"#pragma code_page(1252)\r\n"
"#include ""res\\J3ItemListsppc.rc2"" // non-Microsoft Visual C++ edited resources\r\n"
"#include ""afxres.rc"" // Standard components\r\n"
"#include ""ConnectLoginDlgs.rc""\r\n"
"#include ""AboutDlg.rc""\r\n"
"#endif\r\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Icon
//
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDR_MAINFRAME ICON "res\\J3ItemLists.ico"
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
IDD_J3ITEMLISTS_DIALOG DIALOG 0, 0, 156, 169
STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION
EXSTYLE WS_EX_APPWINDOW | 0x80000000L
问题出在 #include "ConnectLoginDlgsRes.h"
行。头文件位于一个共享文件夹中,如果添加它,它会在其他地方中断。
有什么想法吗?就像我说的,其他人开始了这个,我开始弄明白了。
最佳答案
由于您为 Windows Mobile 编程,我们可以假定您使用 VS2005 或 VS2008。您只需要设置资源编译器的搜索路径即可。
查找丢失的文件“ConnectLoginDlgsRes.h”并在项目属性对话框中添加路径。该路径必须添加到 Configuration Properties
->Resources
->General
中。使用“附加标准包含路径”。
编辑: 由于您的前任员工可能已经为您提供了一个工作项目,因此您还应该检查构建环境。在实际构建 VS 项目之前,您可能需要执行一些脚本。
关于c++ - fatal error RC1015,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16904529/