>>The lib files are from another source (I can't even guarantee it was MS C++),
 
I thought that you can use some binary dump file to view that library file. Just search for key word i.e. Borland, Turbo, Microsoft to guess which compiler generate this. There is a tool in Borland(Turbo) C++ package to dump library, I can't exactly recall the tool name.
 
Do you know who create this static library? Can you ask them? Otherwise how you get document like function prototype?
 
Another suggestion, have you declare function extern C?
 
Regards
Leigh
 
 
 -----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Phil Middlemiss
Sent: Tuesday, January 07, 2003 9:48 AM
To: Multiple recipients of list delphi
Subject: Re: [DUG]: C++ Name mangling

Hi Leigh,
 
Thanks for the reply, I would first like to see if the problem can be solved using the tools I have. The lib files are from another source (I can't even guarantee it was MS C++), and we can't neccessarily justify purchasing another compiler if there is an option with the tools we have.
 
regards,
Phil.
----- Original Message -----
Sent: Tuesday, January 07, 2003 9:24 AM
Subject: RE: [DUG]: C++ Name mangling

Hi Phil,
 
Why you make things complex? C++ naming convention depends on compiler. I would suggest to use MS C++ compiler to create a normal DLL in C which can be used in Delphi. Of course you need a license to use MS C++ compiler. That might be a trouble. Anyway if you can afford Delphi, that should not be a big issue for you.
 
Cheers
Leigh
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Phil Middlemiss
Sent: Tuesday, January 07, 2003 9:09 AM
To: Multiple recipients of list delphi
Subject: [DUG]: C++ Name mangling

Hi all,
 
We have a set of old .lib files generated with MS C++ (I think). I'm trying to use C++ Builder to create a DLL or OCX or something that can then be used in Delphi, but my lack of C++ knowledge is slowing me down. I am having trouble just using the lib files in a simple C++ Builder test app.
 
I have used coff2omf to convert the lib files to Borland format (was getting an invalid OMF error before), but the whole name mangling thing has got me stumped.
 
The header file for the lib has this declaration:
extern int __cdecl mobileCreateConnection(LPTHIS_CONNECTION connection);
 
and if I call mobileCreateConnection in my code then, when compiling, I get the error:
[LinkerError] Unresolved external '_mobileCreateConnection' referenced from c:\APath\TheCallingUnit.OBJ
 
I'm sure this is a simple matter for anyone who has used C++ Builder and had to link to older lib files. Can anyone help?
 
thanks,
Phil.

Reply via email to