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.
 
Regards,
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!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
MinGW-users mailing list
MinGW-users@xxxxxxxxxxxxxxxxxxxxx

This list observes the Etiquette found at 
http://www.mingw.org/Mailing_Lists.
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:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:mingw-users-request@xxxxxxxxxxxxxxxxxxxxx?subject=unsubscribe