delphi7下开发的小工具到XE2下不能编译了,提供源码,帮忙看一下。没有用三方控件。
就两处错误:
[DCC Error] FastMM4Messages.pas(61): E2072 Number of elements (8) differs from declaration (11)
[DCC Fatal Error] FastMM4.pas(1118): F2063 Could not compile used unit 'FastMM4Messages.pas'是个类似仿照查询分析器的工具,需要源码加QQ:435604266
帮忙修改好后,不胜感激!

解决方案 »

  1.   

     E2072 Number of elements (8) differs from declaration (11)
    查下61行前后的语句,与说明的地方是否相符。
      

  2.   

    将fastmm的有关单元注释掉看看
      

  3.   

    to sailxia:
    fastmm 不能去除,取出后查询内容是乱码了.
      

  4.   

    StandardVirtualMethodNames: array[1 + vmtParent div 4 .. -1] of PChar = (
        'SafeCallException',
        'AfterConstruction',
        'BeforeDestruction',
        'Dispatch',
        'DefaultHandler',
        'NewInstance',
        'FreeInstance',
        'Destroy');
    提示:
    [DCC Error] FastMM4Messages.pas(61): E2072 Number of elements (8) differs from declaration (11)
      

  5.   

    {-------------------------Expected Memory Leak Structures--------------------}
    {$ifdef EnableMemoryLeakReporting}  {The layout of an expected leak. All fields may not be specified, in which
       case it may be harder to determine which leaks are expected and which are
       not.}
      PExpectedMemoryLeak = ^TExpectedMemoryLeak;
      PPExpectedMemoryLeak = ^PExpectedMemoryLeak;
      TExpectedMemoryLeak = packed record
        {Linked list pointers}
        PreviousLeak, NextLeak: PExpectedMemoryLeak;
        {Information about the expected leak}
        LeakAddress: Pointer;
        LeakedClass: TClass;
        LeakSize: Integer;
        LeakCount: Integer;
      end;//这个地方提示错误  TExpectedMemoryLeaks = packed record
        {The number of entries used in the expected leaks buffer}
        EntriesUsed: Integer;
        {Freed entries}
        FirstFreeSlot: PExpectedMemoryLeak;
        {Entries with the address specified}
        FirstEntryByAddress: PExpectedMemoryLeak;
        {Entries with no address specified, but with the class specified}
        FirstEntryByClass: PExpectedMemoryLeak;
        {Entries with only size specified}
        FirstEntryBySizeOnly: PExpectedMemoryLeak;
        {The expected leaks buffer}
        ExpectedLeaks: packed array[0..(ExpectedMemoryLeaksListSize - 20) div SizeOf(TExpectedMemoryLeak) - 1] of TExpectedMemoryLeak;
      end;
      PExpectedMemoryLeaks = ^TExpectedMemoryLeaks;{$endif}上面这段提示
    [DCC Fatal Error] FastMM4.pas(1118): F2063 Could not compile used unit 'FastMM4Messages.pas'
      

  6.   

    fastmm已经是Delphi xe2的默认内存管理单元。
    所以即使编译成功,也会给出这样的提示:
    FastMM4 cannot install since memory has already been allocated through the default memory manager.
    FastMM4.pas MUST be the first unit in your project's .dpr file, otherwise memory may be allocated
    through the default memory manager before FastMM4 gains control. If you are using an exception trapper like MadExcept (or any tool that modifies the unit initialization order),
    go into its configuration page and ensure that the FastMM4.pas unit is initialized before any other unit.如果你需要使用其中的某些程序,可以单独提取出来。这一有可以用XE2成功编译的版本:
    http://fastmm.svn.sourceforge.net/viewvc/fastmm/FastMM4Options.inc?revision=36&view=up&pathrev=36
      

  7.   

    to frtrnr:
    我qq435604266,请大侠加。
    分不够,我再加。谢谢。
      

  8.   

    vmtParent?
    估计是xe2的对象内存分布模式有所变化array[1 + vmtParent div 4 .. -1]原来是-8到-1
    xe2下变成了-11到-1
      

  9.   

    可能因为版本不同,单元名称会不同。手工把uses里面有关fastreport的单元都删除,编译后系统会自动加上试试。
      

  10.   


    这个原因?--------------------
    工业控件 www.beaugauge.net
      

  11.   

    [DCC Error] FastMM4Messages.pas(61): E2072 Number of elements (8) differs from declaration (11)
    [DCC Fatal Error] FastMM4.pas(1118): F2063 Could not compile used unit 'FastMM4Messages.pas'61行代码中与前面声明的不符,FASTMM4未安装或者路径不对吧,注释掉
      

  12.   

    第一个问题我也遇见过,原因就是声明不一样,查看一下数组的个数是否一样,声明数组个数是11个,但是赋值只有8个,这会出错。
    FastMM4在Xe2下是没有问题的,一直在用,但是为什么出错就不知道了。