Web lists-archives.com

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




On Friday, February 19, 2016 10:42 PM, Chris wrote
>
> >On Fri, Feb 19, 2016 at 7:26 PM, John Brown  <johnbrown105@xxxxxxxxxxx> wrote:
 
> > Anyway, try removing -static from the unsuccessful command line.

> I gave each suggestion a shot but to no avail.

Let us consider your gendef-generated DEF file:
LIBRARY "vcand32.dll"
EXPORTS
ncdOpenDriver
ncdGetDriverConfig@8
ncdOpenPort@24
...

Your import library exports stdcall names such as ncdDriverConfig@8.
Gendef thinks that the functions are stdcall functions. On the other
hand,  your .o file contains ncdDriverConfig (without the "@8"). The
compiler thinks that the functions follow the C calling convention. You
have to correct the mismatch.The first step is to establish whether the
functions are C functions or stdcall functions.

If they are C functions, then gendef is wrong and you
can fix your problem by removing the "@<total-bytes-in-parameter-list>"
suffix from the DEF file and rebuilding the import library. The question
would then become: why did gendef think that they were stdcall functions?

If they really are stdcall functions, then you need to check the header
file that declares these functions to see why stdcall was not included in
the declarations when your .c  files were compiled. Maybe command line
#defines are present when you build your project but not when you ran
gendef so that the functions end up getting declared differently because
of conditional compilation.

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