rkfch 发表于 2008-10-27 14:17:10

请问如何在Delphi上安装Commport控件?(已解决)【恢复】

RT!看了几种安装方法都有问题!



最后仔细看了它的英文说明文档,里面讲了安装方法。照里面的安装就行了!

但是英文文档里还是有点问题,里面说要把.bpl的文件复制到windows/system32里面去,

但是Commport的安装文件是没有.bpl的文件的,所以那一步就可以省略了!



本贴被 rkfch 编辑过,最后修改时间:2008-10-27,20:14:03.

kctest 发表于 2009-1-13 20:45:04

顶呀

rkfch 发表于 2008-10-29 10:14:53

LS你可以要看一下这个!



//可能需要安装的文件,根据下面安装方法选择

Design-Time Source        Run-Time Source

                ----------------        ---------------

Delphi 3        DsgnCPort3.dpk                CPortLib3.dpk

Delphi 4        DsgnCPort4.dpk                CPortLib4.dpk

Delphi 5        DsgnCPort5.dpk                CPortLib5.dpk

Delphi 6        DsgnCPort6.dpk                CPortLib6.dpk

Delphi 7        DsgnCPort7.dpk                CPortLib7.dpk

Delphi 2005        DsgnCPort9.dpk                CPortLib9.dpk    (also .bdsproj)

Delphi 2006        DsgnCPort10.dpk                CPortLib10.dpk   (also .bdsproj)

C++ Builder 3        DsgnCPortCB3.bpk        CPortLibCB3.bpk

C++ Builder 4        DsgnCPortCB4.bpk        CPortLibCB4.bpk

C++ Builder 5        DsgnCPortCB5.bpk        CPortLibCB5.bpk

C++ Builder 6        DsgnCPortCB6.bpk        CPortLibCB6.bpk



                Design-Time library        Run-Time library

                ----------------        ----------------

Delphi 3        DsgnCPort3.dpl                CPortLib3.dpl

Delphi 4        DsgnCPort4.bpl                CPortLib4.bpl

Delphi 5        DsgnCPort5.bpl                CPortLib5.bpl

Delphi 6        DsgnCPort6.bpl                CPortLib6.bpl

Delphi 7        DsgnCPort7.bpl                CPortLib7.bpl

Delphi 2005        DsgnCPort9.bpl                CPortLib9.bpl

Delphi 2006        DsgnCPort9.bpl                CPortLib9.bpl   (also .lib and .bpi for C++)

C++ Builder 3        DsgnCPortCB3.bpl        CPortLibCB3.bpl (also .lib and .bpi)

C++ Builder 4        DsgnCPortCB4.bpl        CPortLibCB4.bpl (also .lib and .bpi)

C++ Builder 5        DsgnCPortCB5.bpl        CPortLibCB5.bpl (also .lib and .bpi)

C++ Builder 6        DsgnCPortCB6.bpl        CPortLibCB6.bpl (also .lib and .bpi)



//安装方法

For Delphi 3, 4, 5, 6, 7, 2005 & C++ Builder 4, 5, 6:

(C++ Builder users also need to read the C++ Builder notes)



Use "File/Open" menu item in Delphi/C++ Builder IDE to open 

ComPort run-time package source file (see above). Click "Compile" 

button in Package window to compile the library. Now move run-time

package library file or files (see above) from ComPort folder to a

folder that is accessible through the search PATH (e.g. WinNT\System32).



Now you have to install design-time package. Use File/Open menu item

to open design-time package source file (see above). Click "Compile" 

button in Package window to compile the package and "Install" button

to register ComPort into the IDE. ComPort components appear in 

"CPortLib" page of component pallete.  If it complains that it 

can't install it because it can't find a library, you probably

did not put the run-time package in the search path. You might

not get this error until the next time you try to start

Delphi/C++ Builder.



Note: Do not save packages under Delphi/C++ Builder IDE.



For C++ Builder 3

(C++ Builder users also need to read the C++ Builder notes)



C++ Builder 3 does not have a "Package window" like the other products.

So, installation is slightly different.



Use "File/Open" menu item in Delphi/C++ Builder IDE to open 

ComPort run-time package source file (see above). Compile the

package from the project menu or Ctrl-F9. Now move run-time

package library files (see above) from ComPort folder to a folder

that is accessible through the search PATH (e.g. WinNT\System32).



Now you have to install design-time package. Use File/Open menu item

to open design-time package source file (see above).  Compile the

package from the project menu or Ctrl-F9.  To install the package

into the IDE, go to the Component menu, "Install Packages" option.

Click the Add button.  Browse to the design-time library and select

it.  If it complains that it can't install it because it can't find

a library, you probably did not put the run-time package in the

search path as described above.



Note about Delphi 2:



Note: Delphi 2 is no longer suported, however, with some minor changes, 

it should compile under Delphi 2 as well.



Use "Component/Install" menu item to add "CPortReg.pas" unit to the 

component library. This unit registers ComPort components on 

"CPortLib" page of component pallete.





7. C++ Builder Notes

------------------------------------------------------------------------------

The .hpp file C++ Builder creates for cport.pas will have a bug in it.

The first time you compile a project, you will get one or two duplicate 

definitions within the EComPort exception class.  It seems to be safe to

delete or comment out the duplicates.



Also, the CPortCtl.HPP may have a bug in it.  If you get an error about

the following being ambiguous;



typedef TBitmap TLedBitmap;



Change it to:



typedef Graphics::TBitmap TLedBitmap;



If someone knows how to fix these more cleanly, please post what you

find to the CPort Forum so that we can incorporate your findings in

future revisions.

hqwei 发表于 2008-10-28 21:15:21

我现在也遇到了这个问题,安装完后,系统找不到CPortLibCB6.bpl,并且我已经设置了LIB的地址,但是好像没什么用。

请那些已经安装成功的,能否给个经验!!我用的是C++BUILDER6.0

hqwei 发表于 2008-10-28 21:15:20

我现在也遇到了这个问题,安装完后,系统找不到CPortLibCB6.bpl,并且我已经设置了LIB的地址,但是好像没什么用。

请那些已经安装成功的,能否给个经验!!我用的是C++BUILDER6.0

rkfch 发表于 2008-10-27 14:49:14

就是在delphi下!

用File/Open装上后,在Tool/Envirenment里设置Libary,找不到控件;

112233 发表于 2008-10-27 14:35:23

当年因为看到delphi书上写的



"真正的程序员用VC,聪明的程序员用delphi",



所以就用上delphi了,



但后来一品味这句话的真正含义,才知道----在成为聪明的程序员之前,必定先要成为一个真正的程序员



所以就不再用它了。



建议用VC++或MFC.

本贴被 112233 编辑过,最后修改时间:2008-10-27,14:40:22.

112233 发表于 2008-10-27 14:34:21

你是在delphi下吗?那个东东几年前我花了三天时间才装上去的。后来再也没有用过delphi了。

382383706 发表于 2009-12-14 17:28:18

页: [1]
查看完整版本: 请问如何在Delphi上安装Commport控件?(已解决)【恢复】