Subject: | fails to compile on Strawberry 5.14, 5.18, etc. for lack of MIN macro |
On some older versions of Strawberry including at least 5.14 and 5.18 I am seeing this linker error when building Encode out of CPAN:
g++ -o ..\blib\arch\auto\Encode\Unicode\Unicode.dll -Wl,--base-file -Wl,dll.base -mdll -s -L"D:\lang\perl\strawberry\x64\5.14.4\perl\lib\CORE" -L"D:\lang\perl\strawberry\x64\5.14.4\c\lib" Unicode.o D:\lang\perl\strawberry\x64\5.14.4\perl\lib\CORE\libperl514.a -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32 dll.exp
Unicode.o:Unicode.c:(.text+0x1f10): undefined reference to `MIN'
My understanding is that MIN is a macro that is a non-standard GNU extension, so this could be broken in other compilers on other platforms as well. It looks like this has been fixed in git by adding an ifndef MIN. So probably only a release is necessary to fix this.