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

#42 Cross-compile on Linux for Windows: compilation errors

open
nobody
None
5
2013-04-06
2010-06-23
Yanis Kurganov
No

FLAC 1.2.1
Linux Ubuntu Lucid, gcc-mingw32 4.4.2

Configuration command:
./configure --prefix=/home/user/temp --enable-static --disable-shared --disable-asm-optimizations --disable-3dnow --disable-altivec --disable-xmms-plugin --disable-cpplibs --disable-oggtest --disable-rpath --build=x86_64-linux-gnu --host=i586-mingw32msvc --with-ogg-includes=/usr/local/i586-mingw32msvc/include/ --with-ogg-libraries=/usr/local/i586-mingw32msvc/lib/

Result:
../../include/share/alloc.h:42:5: error: #error
../../include/share/alloc.h:121: error: 'SIZE_T_MAX' undeclared (first use in this function)

Solution:
in file flac-1.2.1/include/share/alloc.h
#include <stdint.h> (which defines SIZE_MAX)

Sorry, I can't fully test this diff, use it only as template.

Discussion

  • Yanis Kurganov
    Yanis Kurganov
    2010-06-23

    config.h/log

     
    Attachments
  • Ulrich Klauer
    Ulrich Klauer
    2013-04-06

    Should be fixed in 1.3.0. Actually, stdint.h was already #included in 1.2.1 (include/share/alloc.h:32), but #ifdef'ed out for mingw. The #ifdef has been changed and should include stdint.h if present.