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