Web lists-archives.com

Re: [Mingw-users] Problems creating linkable file from MSVC .lib

Chris <chricro@...> writes:

> John,
> Thanks for the prompt and detailed response.
> I was able to set all of the calling conventions to __stdcall. Then
> I was able to link the .dll.a that I build with dlltool using the
> MSVC def file (with  <at> XX in it)
> ...
> Why am I supposed --add-stdcall-alias in dlltool's options when the def
already contains  <at> XX for every symbol?

Because the alias is the name *without* @n. When you --add-stdcall-alias,
you export the additional name ncdActivateChannel so the the library
exports two names for the same function, unless you add the --kill-at
option, which suppresses the @n names.

 Whether I include it or not, the result is the same:
> 00000000 I __imp__ncdActivateChannel <at> 800000000 T _ncdActivateChannel
<at> 8
> While editing the header I noticed that every function also has
__declspec(dllimport) before __stdcall as well, if that changes things.

This is fine. That is what your function prototypes should look like
if you intend to link to an import library, although I think the
linker is smart enough to find the function whether the __declspec\
is there or not.
John Brown.

Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
MinGW-users mailing list

This list observes the Etiquette found at 
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

You may change your MinGW Account Options or unsubscribe at:
Also: mailto:mingw-users-request@xxxxxxxxxxxxxxxxxxxxx?subject=unsubscribe