[flac-dev] make dllimport/dllexport attributes work with mingw (and others)

lvqcl lvqcl.mail at gmail.com
Sat May 24 00:12:29 PDT 2014


Ozkan Sezer <sezeroz at gmail.com> писал(а) в своём письме Sat, 24 May 2014 10:16:15 +0400:

> - changes the _MSC_VER condition to universally _WIN32: MSVC, as well
>   as GCC supports this.

MSYS/MinGW 4.8.3, 4.9.0 can't compile code from git after this patch:

format.c:47:22: error: variable 'FLAC__VERSION_STRING' definition is marked dllimport
  FLAC_API const char *FLAC__VERSION_STRING = VERSION;
                       ^
format.c:47:22: warning: 'FLAC__VERSION_STRING' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
format.c:49:22: error: variable 'FLAC__VENDOR_STRING' definition is marked dllimport
  FLAC_API const char *FLAC__VENDOR_STRING = "reference libFLAC " VERSION " 20130526";
                       ^
format.c:49:22: warning: 'FLAC__VENDOR_STRING' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]

...
...


FLAC_API_EXPORTS macro is defined in libFLAC_dynamic.vcproj,
FLACPP_API_EXPORTS macro is defined in libFLAC++_dynamic.vcproj,
but MinGW/GCC makefiles don't define them anywhere.


More information about the flac-dev mailing list