我刚刚购买了Delphi 2010(跳过了2009版本),现在正试图让我的项目编译。然而,我遇到了一些编译Virtual Treeview 4.8.5的问题。有人能够提供一个绝对可靠的方法,在Delphi 2010中编译和安装Virtual Treeview吗?
我刚刚购买了Delphi 2010(跳过了2009版本),现在正试图让我的项目编译。然而,我遇到了一些编译Virtual Treeview 4.8.5的问题。有人能够提供一个绝对可靠的方法,在Delphi 2010中编译和安装Virtual Treeview吗?
根据Nick的建议,这是我所做的。
我使用TortoiseSVN获取了最新的代码。
修改了Common/Compilers.inc并添加了这两个部分。
// RAD STUDIO 2010 (BDS 7.0) DELPHI and BCB are no longer defined, only COMPILER
{$ifdef VER210}
{$define COMPILER_14}
{$endif VER210}
{$ifdef COMPILER_14}
{$define COMPILER_1_UP}
{$define COMPILER_2_UP}
{$define COMPILER_3_UP}
{$define COMPILER_4_UP}
{$define COMPILER_5_UP}
{$define COMPILER_6_UP}
{$define COMPILER_7_UP}
{$define COMPILER_8_UP}
{$define COMPILER_9_UP}
{$define COMPILER_10_UP}
{$define COMPILER_11_UP}
{$define COMPILER_12_UP}
{$define COMPILER_14_UP}
// Backwards compatibility
{$define DELPHI_2_UP}
{$define DELPHI_3_UP}
{$define DELPHI_4_UP}
{$define DELPHI_5_UP}
{$define DELPHI_6_UP}
{$define DELPHI_7_UP}
{$define DELPHI_8_UP}
{$define DELPHI_9_UP}
{$define CPPB_3_UP}
{$define CPPB_4_UP}
{$define CPPB_5_UP}
{$define CPPB_6_UP}
{$ifdef BCB}
{$define CPPB}
{$else}
{$define DELPHI}
{$endif}
{$endif}
然后我只需要在编译时将Common、Source和Design文件夹添加到源路径中。 然后编译VirtualTreesD12.dpk,接着编译VirtualTreesD12D.dpk。
现在进入下一个问题...
嗯,我没有使用过它,但我已经更新了一些其他组件,并且有一些通用技巧可以帮助。首先,我会检查并查看是否有一个包含文件,所有或几乎所有单元都使用其中的各种Delphi版本的$DEFINE
。如果是这样,您可能需要为Delphi 2010更新它。这是您问题的最有可能的来源,因为根据Nick Ring的说法,有一个可工作的D2009版本,因此Unicode转换不是问题。
我刚刚自己完成了它。从2009版本开始,只需编辑两个compiler.inc文件(一个在源目录下,一个在设计目录下)。如Mason所说,只需复制定义使用VER200的部分,并将VER200更改为VER210。编译并安装时没有任何问题。祝你好运!