将跟程序有关的res,dcu文件全部铲除,重新builder all,自动生成新的文件

解决方案 »

  1.   

      我已铲除了所有的res与dcu文件,并且查找项目中的所有文件中的$R指令,没有包含相同资源,问题还是没有解决!
      

  2.   

    删除。DSK的文件,
    或者你是否本地磁盘上有该程序备份,如有将备份程序的路径改名
      

  3.   

    你查看你的代码pas文件,看看是否有两个文件都加入相同的资源文件
      

  4.   

    有如下两种解决的方法(从别处得来) Duplicate resource identifier errorQuestion
    Duplicate Resource identifier (c:/delphi/lib/controls.res)  ERROR!
    I keep getting this... I don't know what's wrong... my project .RES
    called (project1.res) doesn't have a single thing that's in common
    with controls.res!
    This is driving me absolutely nuts... the only thing I ever did was
    to delete {$R .res} in the project file but since the, I've replaced
    that line...
    AnswerA:
    Do you have the VCL source?  If so, you may want to recompile the whole thing
    by adding that directory to your Library path in Environment Options | Library.
    I think I had to do this once to get rid of such an error.  Another thing to
    do is to figure out which $R directive is causing the problem, by removing it
    temporarily and recompiling.  You can temporarily disable the $R directive by
    adding a '.' before the $ (that's one of many ways to do it).A:
    You probably have subclassed one of the built in VCL's.  You need to be sure
    that the resource identifier for your icon is unique.  Just pull it up in any
    resource editor and change its number. Then you should be able to rebuild your
    library.
      

  5.   

    这个问题很怪。我遇到过,后来仔细查看代码
    发现与自己的程序没有任何关系,居然是DELPHI
    默认目录下的UNIT文件捣鬼。。尽量把现在程序
    中名为UNIT1,UNIT2之类的改名。。