尝试使用 StrawberryPerl 5.32.0.1 通过 CPAN 安装 Tk,最后出现错误。尝试了 32 位和 64 位版本,并得到相同的错误。这是相关行的输出:
"C:\Strawberry\perl\bin\perl.exe" -MExtUtils::Mksymlists \
-e "Mksymlists('NAME'=>\"Tk\", 'DLBASE' => 'Tk', 'DL_FUNCS' => { }, 'FUNCLIST' => [], 'IMPORTS' => { }, 'DL_VARS' => []);"
g++ Tk.def -o blib\arch\auto\Tk\Tk.xs.dll -mdll -s -L"C:\STRAWB~1\perl\lib\CORE" -L"C:\STRAWB~1\c\lib" Tk.o chnGlue.o encGlue.o evtGlue.o objGlue.o pTk\tkres.o tixGlue.o tkGlue.o tkGlue_f.o tkWin32Dll.o pTk/libpTk.a "C:\STRAWB~1\perl\lib\CORE\libperl532.a" "C:\STRAWB~1\c\i686-w64-mingw32\lib\libimm32.a" "C:\STRAWB~1\c\i686-w64-mingw32\lib\libcomctl32.a" "C:\STRAWB~1\c\i686-w64-mingw32\lib\libcomdlg32.a" "C:\STRAWB~1\c\i686-w64-mingw32\lib\libgdi32.a" "C:\STRAWB~1\c\i686-w64-mingw32\lib\libcomctl32.a" "C:\STRAWB~1\c\i686-w64-mingw32\lib\libimm32.a" "C:\STRAWB~1\c\i686-w64-mingw32\lib\libmoldname.a" "C:\STRAWB~1\c\i686-w64-mingw32\lib\libkernel32.a" "C:\STRAWB~1\c\i686-w64-mingw32\lib\libuser32.a" "C:\STRAWB~1\c\i686-w64-mingw32\lib\libgdi32.a" "C:\STRAWB~1\c\i686-w64-mingw32\lib\libwinspool.a" "C:\STRAWB~1\c\i686-w64-mingw32\lib\libcomdlg32.a" "C:\STRAWB~1\c\i686-w64-mingw32\lib\libadvapi32.a" "C:\STRAWB~1\c\i686-w64-mingw32\lib\libshell32.a" "C:\STRAWB~1\c\i686-w64-mingw32\lib\libole32.a" "C:\STRAWB~1\c\i686-w64-mingw32\lib\liboleaut32.a" "C:\STRAWB~1\c\i686-w64-mingw32\lib\libnetapi32.a" "C:\STRAWB~1\c\i686-w64-mingw32\lib\libuuid.a" "C:\STRAWB~1\c\i686-w64-mingw32\lib\libws2_32.a" "C:\STRAWB~1\c\i686-w64-mingw32\lib\libmpr.a" "C:\STRAWB~1\c\i686-w64-mingw32\lib\libwinmm.a" "C:\STRAWB~1\c\i686-w64-mingw32\lib\libversion.a" "C:\STRAWB~1\c\i686-w64-mingw32\lib\libodbc32.a" "C:\STRAWB~1\c\i686-w64-mingw32\lib\libodbccp32.a" "C:\STRAWB~1\c\i686-w64-mingw32\lib\libcomctl32.a" -Wl,--enable-auto-image-base
C:/Strawberry/c/bin/../lib/gcc/i686-w64-mingw32/8.3.0/../../../../i686-w64-mingw32/bin/ld.exe: encGlue.o:encGlue.c:(.text+0x3f): undefined reference to `MAX'
C:/Strawberry/c/bin/../lib/gcc/i686-w64-mingw32/8.3.0/../../../../i686-w64-mingw32/bin/ld.exe: encGlue.o:encGlue.c:(.text+0x9f): undefined reference to `MAX'
C:/Strawberry/c/bin/../lib/gcc/i686-w64-mingw32/8.3.0/../../../../i686-w64-mingw32/bin/ld.exe: encGlue.o:encGlue.c:(.text+0x798): undefined reference to `MAX'
collect2.exe: error: ld returned 1 exit status
gmake: *** [Makefile:619: blib\arch\auto\Tk\Tk.xs.dll] Error 1
SREZIC/Tk-804.035.tar.gz
C:\STRAWB~1\c\bin\gmake.exe -- NOT OK
Stopping: 'install' failed for 'Tk'.
Failed during this command:
SREZIC/Tk-804.035.tar.gz : make NO