This is the mail archive of the libffi-discuss@sourceware.org mailing list for the libffi project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Building libffi with MSVC


On 2012-12-06 05:58, John Emmas wrote:
> 
> On 5 Dec 2012, at 23:13, Peter Rosin wrote:
> 
>>
>> I made some notes in:
>> http://sourceware.org/ml/libffi-discuss/2012/msg00144.html
>>
> 
> Thanks Peter,
> 
> That all looks 'do-able' - given enough time.  In the meantime though, is
> there anywhere where I can obtain a 'dev' version for MSVC?  i.e. the usual
> import lib, DLL and header files?  I tried the 'cheap & dirty' approach of
> downloading the standard (MinGW?) dev version and simply renaming
> libffi.dll.a and calling it libffi.lib.  Often that does work (well, at
> least enough to get me started) but it didn't work in this case (the various
> symbols weren't recognised by MSVC's linker).

I will not recommend that in this case even if you did get it to link.
GCC has incompatible calling convention in some corner cases.

> I do have some experience with Cygwin as well as TDM-GCC (a version of
> MinGW, I'm led to believe) but I haven't yet encountered MSYS.

MSYS is a fork (an old one) of Cygwin, designed to support native (MinGW)
apps better.

> I'm sure this'll sound like a dumb question - but since the 'configure'
> shell gets provided by MSYS, why is there any need to involve Cygwin in
> the process?  Surely MSYS and TDM-GCC would suffice?

'configure' is not "provided by MSYS". 'configure' is provided by whomever
runs autoconf. That might be you in an MSYS shell, but that's not at all
necessary, and indeed, if you are using a released libffi tarball, the
'configure' script is provided for you. What MSYS will do is provide all
the tools needed when you actually run the 'configure' script (bash, gawk,
sed, etc). However, MSYS lacks some of the more complex tools needed
by the libffi testsuite, and I went for the hybrid Cygwin/MSYS setup
described in the referenced post when I satisfied those dependencies.

I think you can skip Cygwin if you don't want to run the testsuite.

<rant>
I sympathize with the Cygwin project leads when it comes to helping
persons that refuse to help themselves and expect everything to be
provided for them (which is generally what they frown upon). I don't
know the specifics of your experience, but you are begging for more
even if you have been given a fairly detailed description of how to
help yourself. In other words, I will not build the libraries for
you. Heck, I don't even know what version of MSVC you are using, or
what runtime you wish to use, so how could I? If you expect all
possible combinations to just magically appear you need to think
again. This is open *source*.
</rant>

Cheers,
Peter


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]