This is the mail archive of the
libffi-discuss@sourceware.org
mailing list for the libffi project.
Re: [PATCH] Use FFI_DECLARE macros
On 02/23/2010 11:32 PM, Dan Witte wrote:
This breaks the Mozilla build with:
e:/builds/slave/win32-hg/build/js/ctypes/libffi/src/prep_cif.c(168) : error C2491: 'ffi_prep_closure' : definition of dllimport function not allowed
Seems that -DDLL_EXPORT is missing.
(As a side note, Mozilla links the static libffi library, so I never tested the shared configuration - hence I'm not surprised that you had to roll this patch.)
I'm not fan of static libraries, but since the msvc support started
think it should be fully implemented cause many projects beyond
mozilla are using it like python, jna etc. They currently have
their own spins which makes them out of sync.
So there are few things missing like .rc, manifest embedding
and pure windows nmake makefile.
However I'll make another patch that would allow to
build eaither static or dynamic library.
This would however require that one wishing to use the static
library would need to define -DLIBFFI_DECLARE_STATIC before
including ffi.h
Regards
--
^TM