Installing the Delphi7 control package in BCB6

Source: Internet
Author: User

In fact, just create a new package, and then put the D7 in the package contains the Pas file is also included in the line. It will also automatically include the corresponding BPI file.

For Bcb6 not in the Posex function can be processed, the implementation of D7 in a new Pas file, and then the conditional compilation on the line, and for the path to find PAS, to set in Lib search instead of include search.

Uses

{$IFDEF BCB}
STRUTILS_D7_BCB6,
{$ENDIF}

Unit strutils_d7_bcb6;

Interface

Uses
Sysutils, Types;

function Posex (const SUBSTR, s:string; offset:cardinal = 1): Integer;

Implementation

{$IFDEF MSWindows}
Uses
Windows;
{$ENDIF}
{$IFDEF LINUX}
Uses
LIBC;
{$ENDIF}



function Posex (const SUBSTR, s:string; offset:cardinal = 1): Integer;
Var
I,x:integer;
Len, Lensubstr:integer;
Begin
If Offset = 1 Then
Result: = Pos (SubStr, S)
Else
Begin
I: = Offset;
LENSUBSTR: = Length (SUBSTR);
Len: = Length (S)-lensubstr + 1;
While I <= Len do
Begin
If s[i] = substr[1] Then
Begin
X: = 1;
while (X < LENSUBSTR) and (S[i + X] = substr[x + 1]) do
INC (X);
if (X = lensubstr) Then
Begin
Result: = I;
Exit
End
End
INC (I);
End
Result: = 0;
End
End


//--------------------------------------------------
End.

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

Http://www.ccrun.com/article.asp?i=1033&d=8oh4u2

There will be a super-classic error:
[Linker Fatal Error] fatal:unable to open file ' DB. OBJ '
Estimated in the BCB6 installed DevExpress Friends Many have encountered this problem, Demon elder brother also spent N long time to take care of, hehe, the solution is:
Click requires--on the Package-dclcxtreelistvclc6.bpk window and click the Add button--"In the Add Unit window-click browse...--" to find the $ (BCB) \lib\release\ DBRTL.BPI Add in
Compile at this time, just stay successful, then install (installs) you can see the long-awaited cxtreelist.

Http://www.cnblogs.com/-clq/archive/2012/01/01/2309417.html

Installing the Delphi7 control package in BCB6

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.