godcha
asked on
Using C++Builder code in Delphi
I am trying to use the {$L xxxx.obj} documented feature with Delphi 4.
The OBJ file is generated with C++Builder 4.
I get the following error message :
Unsatisfied forward declaration or uncorrect external declaration.
Can someone tell me why ? I am thinking of a problem of correspondence between Delphi and C++ types...
The OBJ file is generated with C++Builder 4.
I get the following error message :
Unsatisfied forward declaration or uncorrect external declaration.
Can someone tell me why ? I am thinking of a problem of correspondence between Delphi and C++ types...
ASKER
Edited text of question.
did you specify the correct path? :
{$L myprogramdir/test/testing. obj}
{$L myprogramdir/test/testing.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
In additionto Barry's comment:
Some C library functions can quite easily emulated. If you need that I can provide these functions:
function _malloc(Size : Integer): Pointer; cdecl;
procedure _free(Ptr : Pointer); cdecl;
function _calloc(NItems : Integer; Size : Integer) : Pointer; cdecl;
function _realloc(block : Pointer; Size : Integer) : Pointer; cdecl;
function _strcat(Dest, Source: PChar): PChar; cdecl;
function _strlen(P1: PChar): Integer; cdecl;
function _strcpy(Dest, Source: PChar): PChar; cdecl;
function _strncmp( const s1 : Pchar;
const s2 : Pchar; maxlen : Integer) : Integer; cdecl;
function _strncpy( dest : Pchar;
const src : Pchar; maxlen : Integer) : PChar; cdecl;
function _strtok(const s1 : PChar; const s2 : PChar) : PChar; cdecl;
function _tolower( ch : Integer ) : Integer; cdecl;
procedure _memset(P: Pointer; Value: Integer; Count: Cardinal); cdecl;
function _memcpy(Dest, Source: Pointer; Len: Integer): Pointer; cdecl;
function _memcmp( const s1 : PByteArray;
const s2 : PByteArray;
const Size : Integer ): Integer; cdecl;
function _ltoa(Value : LongInt; Str : PChar; Radix : Integer) : PChar; cdecl;
function _exp( value : double ) : double; cdecl;
function _floor( value : double ) : double; cdecl;
function _log( value : double ) : double; cdecl;
function _sqrt( value : double ) : double; cdecl;
function _fabs( value : double) : double; cdecl;
function _pow( x : double; y : double ) : double; cdecl;
procedure __turboFloat; cdecl;
procedure __streams; cdecl;
It's a unit of ~600 lines and I got it with an uncomplete PNG implementation from Zwabbert. Note: I haven't tried the code yet!
Whoever needs the code call me at public@lischke-online.de.
Ciao, Mike
Some C library functions can quite easily emulated. If you need that I can provide these functions:
function _malloc(Size : Integer): Pointer; cdecl;
procedure _free(Ptr : Pointer); cdecl;
function _calloc(NItems : Integer; Size : Integer) : Pointer; cdecl;
function _realloc(block : Pointer; Size : Integer) : Pointer; cdecl;
function _strcat(Dest, Source: PChar): PChar; cdecl;
function _strlen(P1: PChar): Integer; cdecl;
function _strcpy(Dest, Source: PChar): PChar; cdecl;
function _strncmp( const s1 : Pchar;
const s2 : Pchar; maxlen : Integer) : Integer; cdecl;
function _strncpy( dest : Pchar;
const src : Pchar; maxlen : Integer) : PChar; cdecl;
function _strtok(const s1 : PChar; const s2 : PChar) : PChar; cdecl;
function _tolower( ch : Integer ) : Integer; cdecl;
procedure _memset(P: Pointer; Value: Integer; Count: Cardinal); cdecl;
function _memcpy(Dest, Source: Pointer; Len: Integer): Pointer; cdecl;
function _memcmp( const s1 : PByteArray;
const s2 : PByteArray;
const Size : Integer ): Integer; cdecl;
function _ltoa(Value : LongInt; Str : PChar; Radix : Integer) : PChar; cdecl;
function _exp( value : double ) : double; cdecl;
function _floor( value : double ) : double; cdecl;
function _log( value : double ) : double; cdecl;
function _sqrt( value : double ) : double; cdecl;
function _fabs( value : double) : double; cdecl;
function _pow( x : double; y : double ) : double; cdecl;
procedure __turboFloat; cdecl;
procedure __streams; cdecl;
It's a unit of ~600 lines and I got it with an uncomplete PNG implementation from Zwabbert. Note: I haven't tried the code yet!
Whoever needs the code call me at public@lischke-online.de.
Ciao, Mike
some ti's on the matter
http://www.borland.com/devsupport/bcppbuilder/ti/TI2431C.html
there is a delphi ti as well but i could'nt find it.
http://www.borland.com/devsupport/bcppbuilder/ti/TI2431C.html
there is a delphi ti as well but i could'nt find it.
ASKER
To Inthe
Why won't it work with code using C runtime library routines ?
Why won't it work with code using C runtime library routines ?
Hi
i have no idea why not but it came from a teamb member and they usually know what they are are on about ;-)
i have no idea why not but it came from a teamb member and they usually know what they are are on about ;-)
ASKER