搜索
bottom↓
回复: 8

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

[复制链接]

出0入0汤圆

发表于 2008-10-27 14:17:10 | 显示全部楼层 |阅读模式
RT!看了几种安装方法都有问题!



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

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

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



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

阿莫论坛20周年了!感谢大家的支持与爱护!!

一只鸟敢站在脆弱的枝条上歇脚,它依仗的不是枝条不会断,而是自己有翅膀,会飞。

出0入0汤圆

发表于 2009-1-13 20:45:04 | 显示全部楼层
顶呀

出0入0汤圆

 楼主| 发表于 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.

出0入0汤圆

发表于 2008-10-28 21:15:21 | 显示全部楼层
我现在也遇到了这个问题,安装完后,系统找不到CPortLibCB6.bpl,并且我已经设置了LIB的地址,但是好像没什么用。

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

出0入0汤圆

发表于 2008-10-28 21:15:20 | 显示全部楼层
我现在也遇到了这个问题,安装完后,系统找不到CPortLibCB6.bpl,并且我已经设置了LIB的地址,但是好像没什么用。

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

出0入0汤圆

 楼主| 发表于 2008-10-27 14:49:14 | 显示全部楼层
就是在delphi下!

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

出0入0汤圆

发表于 2008-10-27 14:35:23 | 显示全部楼层
当年因为看到delphi书上写的



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



所以就用上delphi了,



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



所以就不再用它了。



建议用VC++或MFC.

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

出0入0汤圆

发表于 2008-10-27 14:34:21 | 显示全部楼层
你是在delphi下吗?那个东东几年前我花了三天时间才装上去的。后来再也没有用过delphi了。

出0入0汤圆

发表于 2009-12-14 17:28:18 | 显示全部楼层
回帖提示: 反政府言论将被立即封锁ID 在按“提交”前,请自问一下:我这样表达会给举报吗,会给自己惹麻烦吗? 另外:尽量不要使用Mark、顶等没有意义的回复。不得大量使用大字体和彩色字。【本论坛不允许直接上传手机拍摄图片,浪费大家下载带宽和论坛服务器空间,请压缩后(图片小于1兆)才上传。压缩方法可以在微信里面发给自己(不要勾选“原图),然后下载,就能得到压缩后的图片】。另外,手机版只能上传图片,要上传附件需要切换到电脑版(不需要使用电脑,手机上切换到电脑版就行,页面底部)。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|Archiver|amobbs.com 阿莫电子技术论坛 ( 粤ICP备2022115958号, 版权所有:东莞阿莫电子贸易商行 创办于2004年 (公安交互式论坛备案:44190002001997 ) )

GMT+8, 2024-5-20 15:21

© Since 2004 www.amobbs.com, 原www.ourdev.cn, 原www.ouravr.com

快速回复 返回顶部 返回列表