Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#31 FIX mingw+msys compilation and DLL support.

closed-fixed
Josh Coalson
None
7
2009-01-03
2008-06-23
Carlo Bramini
No

I tried to compile latest version of FLAC with MINGW+MSYS.
Here you are the fixes that I would like to suggest:

- Added into configure.in the ability to compile DLL with --enable-shared.
For this purpose I added, in addition to AC_LIBTOOL_WIN32_DLL, a macro called LT_NO_UNDEFINED that's used for adding the "-no-undefined" parameter to libtool when Windows host is detected.
For building LibFLAC-8.dll I had also to add the dependency to WinSock, because ntohs() function.

- I got an error because both SIZE_MAX and SIZE_T_MAX were undefined.
The error comes from /include/shares/alloc.h because stdint.h was not included.
Actually there was a real work-around made for by-passing the inclusion of stdint.h with Mingw32.
I was not able to understand the reasons of this limitation, but I was forced to remove that for getting it compilable.
So I just surrounded it with the HAVE_STDINT_H macro, which should make it working on all platforms.
stdint.h also exists into the latest Microsoft SDK, so it will work on MSVC too even if HAVE_STDINT_H is defined.

- I had also another problem which is not covered by currently attached patch.
I had to upgrade these files to a newer version:

config.guess
config.sub
install-sh
ltmain.sh
missing
mkinstalldirs

otherwise the compilation, especially when creating the libraries, becomed crazy and it failed.

Sincerely,

Carlo Bramini.

Discussion

  • Carlo Bramini
    Carlo Bramini
    2008-06-23

    The patch.

     
    Attachments
  • Josh Coalson
    Josh Coalson
    2009-01-02

    • priority: 5 --> 7
    • assigned_to: nobody --> jcoalson
    • status: open --> open-accepted
     
  • Josh Coalson
    Josh Coalson
    2009-01-03

    • status: open-accepted --> closed-fixed
     
  • Josh Coalson
    Josh Coalson
    2009-01-03

    thanks, fixed in cvs