我在DLL里面加了一个资源,是CDialog资源 。在mydlg.h里面我定义的读出是class AFX_EXT_CLASS mydlg : public CDialog
结果是编译有错误,vc++说“E:\新建文件夹\我的程序\mydlg.cpp(5) : fatal error C1083: Cannot open include file: ' \ add additional includes here': Invalid argument
请大家给我指出我那而错了,怎么解决,谢谢啊。
///////////////////////////////////////////////////////////////////////
现在我什么也没有做,就在dll 里面加了一个cdialog资源,:#include "add additional includes here'"换成#include"afxdlgs.h"结果就有两个错误了e:\新建文件夹\dfd\mydlg.h(21) : error C2065: 'IDD_DIALOG1' : undeclared identifier
e:\新建文件夹\dfd\mydlg.h(21) : error C2057: expected constant expression .删掉,:#include "add additional "也有这样的错误,我想加的CDialog是mfc的,
 lanstar200说的也不行的.

解决方案 »

  1.   

    楼主说了很多。不会连.exe都没做就先学dll了。
      

  2.   

    .cpp里面少了.h文件,比如你的程序是XXdlg.h,xxdlg.cpp
    你的cpp得里面少了 
    #include "xxdlg.h"
    如果加#"resource.h"好像要报link错误
      

  3.   

    包含头文件了没
    #include "resource.h"
      

  4.   

    首先加上 #include "resource.h"如果还不行就再讨论吧...
      

  5.   

    #include "resource.h"
    #include "xxdlg.h"
    这些我都加了啊,可是还是有error C2065: 'IDD_DIALOG1' : undeclared identifier
    e:\新建文件夹\dfd\mydlg.h(21) : error C2057: expected constant expression 这样的错误
      

  6.   

    #include "resource.h"
    #include "xxdlg.h"
    这些我都加了啊,可是还是有error C2065: 'IDD_DIALOG1' : undeclared identifier
    e:\新建文件夹\dfd\mydlg.h(21) : error C2057: expected constant expression 这样的错误
    "xxdlg.h"我用的是我自己的CLASS 还用过"afxdlgs.h"
      

  7.   

    你的对话框资源被你编辑过了吧?error C2065: 'IDD_DIALOG1' : undeclared identifier说的是 'IDD_DIALOG1'这个东西未定义。'IDD_DIALOG1'是插入对话框的时候系统默认加的。再资源视图中看看对话框的名字是什么,修改一下
      

  8.   

    pomelowu(羽战士)你说对了,你能具体的告诉我原因吗?