Article View: borland.public.cppbuilder.nativeapi
Article #1230Re: Using __stdcall
From: Bob Gonder
Date: Sun, 14 Oct 2007 23:51
Date: Sun, 14 Oct 2007 23:51
38 lines
2172 bytes
2172 bytes
Sue King wrote:
>I have some old C code that I wish to compile using the 2007 C/C++ in
>RAD Studio Professional. This links to a dll that uses __stdcall and
>gives names such as _Function@4 in the .lib file.
Matching Google links:
http://groups.google.com/group/borland.public.cppbuilder.winapi/browse_thread/thread/3f81609418611afd
http://tinyurl.com/37zs7z
http://groups.google.com/group/borland.public.cpp.borlandcpp/browse_thread/thread/87925e78fe34c6c5
http://tinyurl.com/2n3jbn
>I don't seem to be able to get the compiler to pick up the mangled name.
> The error is [ILINK32 Error]Error: Unresolved external 'Function'
>referenced from xx.obj
What does the function delcaration look like?
It should look something like this
#define MYDLLAPI __declspec(dllimport)
#ifdef __cplusplus
extern "C" {
#endif
MYDLLAPI BOOL __stdcall Function( /*ParamList*/ );
#ifdef __cplusplus
}
#endif
Another thing, in Borland, __stdcall removes the leading _ that
C normally places in front of function names. So you might try
using _Function() in your application.
Or fixup a .DEF file as Ed suggests in the above lnks.
>(Or the correct newsgroup if this is not the right one)
The .IDE group would be ideal for settings.
Technical Details
Message-ID:
<p695h3tbk1cc4q0o89v2nqj1u41e68hlct@4ax.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<47129b93$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,4be438fa70c4738f X-Google-Attributes: gid10cc67,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: Bob Gonder <notbg@notmindspring.invalid> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: Using __stdcall Date: Sun, 14 Oct 2007 16:51:54 -0700 Organization: MindSpring Enterprises, Inc. Reply-To: notbg@notmindspring.invalid Message-ID: <p695h3tbk1cc4q0o89v2nqj1u41e68hlct@4ax.com> References: <47129b93$1@newsgroups.borland.com> X-Newsreader: Forte Agent 1.93/32.576 English (American) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 69.69.81.231 X-Trace: newsgroups.borland.com 1192405916 69.69.81.231 (14 Oct 2007 16:51:56 -0700) Lines: 40 Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail