Windows10下MinGW编译TCL包缺失libtclstub.a/libtkstub.a求助
MinGW编译TCL包缺少libtclstub.a/libtkstub.a的问题解决求助
环境与问题背景
- Windows 10 64位系统
- 使用Git Bash下的MINGW64
- 在MinGW中编译TCL包时,发现
C:\MinGW\lib目录下缺少libtclstub.a和libtkstub.a文件,编译无法完成
执行../configure后的编译错误
执行配置命令后出现大量未定义引用错误,具体信息如下:
css.o:css.c:(.text+0x11): undefined reference to `tclStubsPtr' css.o:css.c:(.text+0xcf): more undefined references to `tclStubsPtr' follow htmldraw.o:htmldraw.c:(.text+0x965): undefined reference to `tkStubsPtr' htmldraw.o:htmldraw.c:(.text+0x9bb): undefined reference to `tkIntXlibStubsPtr' htmldraw.o:htmldraw.c:(.text+0x9cc): undefined reference to `tkStubsPtr' htmldraw.o:htmldraw.c:(.text+0xab2): undefined reference to `tkStubsPtr' htmldraw.o:htmldraw.c:(.text+0xc2b): undefined reference to `tkStubsPtr' htmldraw.o:htmldraw.c:(.text+0xc89): undefined reference to `tkIntXlibStubsPtr' htmldraw.o:htmldraw.c:(.text+0xc9b): undefined reference to `tkStubsPtr' htmldraw.o:htmldraw.c:(.text+0xe22): undefined reference to `tclStubsPtr' htmldraw.o:htmldraw.c:(.text+0xef6): undefined reference to `tclStubsPtr' htmldraw.o:htmldraw.c:(.text+0xf08): undefined reference to `tclStubsPtr' htmldraw.o:htmldraw.c:(.text+0xf44): undefined reference to `tkStubsPtr' htmldraw.o:htmldraw.c:(.text+0xf8b): undefined reference to `tkIntXlibStubsPtr' htmldraw.o:htmldraw.c:(.text+0xff7): undefined reference to `tkStubsPtr' htmldraw.o:htmldraw.c:(.text+0x1030): undefined reference to `tkStubsPtr' htmldraw.o:htmldraw.c:(.text+0x1088): undefined reference to `tkIntXlibStubsPtr' htmldraw.o:htmldraw.c:(.text+0x1093): undefined reference to `tkStubsPtr' htmldraw.o:htmldraw.c:(.text+0x12fd): undefined reference to `tkStubsPtr' htmldraw.o:htmldraw.c:(.text+0x1388): undefined reference to `tkStubsPtr' htmldraw.o:htmldraw.c:(.text+0x1408): undefined reference to `tclStubsPtr' htmldraw.o:htmldraw.c:(.text+0x15e3): more undefined references to `tclStubsPtr' follow htmldraw.o:htmldraw.c:(.text+0x19cf): undefined reference to `tkStubsPtr' htmldraw.o:htmldraw.c:(.text+0x1a3b): undefined reference to `tkIntXlibStubsPtr' htmldraw.o:htmldraw.c:(.text+0x1a50): undefined reference to `tkStubsPtr' htmldraw.o:htmldraw.c:(.text+0x1b58): undefined reference to `tkStubsPtr' htmldraw.o:htmldraw.c:(.text+0x2033): undefined reference to `tclStubsPtr' htmldraw.o:htmldraw.c:(.text+0x275b): undefined reference to `tkStubsPtr' htmldraw.o:htmldraw.c:(.text+0x2787): undefined reference to `tkStubsPtr' htmldraw.o:htmldraw.c:(.text+0x27ed): undefined reference to `tkStubsPtr' htmldraw.o:htmldraw.c:(.text+0x27f8): undefined reference to `tkStubsPtr' htmldraw.o:htmldraw.c:(.text+0x287c): undefined reference to `tkStubsPtr' htmldraw.o:htmldraw.c:(.text+0x28bd): undefined reference to `tkIntXlibStubsPtr' htmldraw.o:htmldraw.c:(.text+0x28cc): undefined reference to `tkStubsPtr' htmldraw.o:htmldraw.c:(.text+0x2a00): more undefined references to `tkStubsPtr' follow htmldraw.o:htmldraw.c:(.text+0x310b): undefined reference to `tclStubsPtr' htmldraw.o:htmldraw.c:(.text+0x3b85): more undefined references to `tclStubsPtr' follow htmldraw.o:htmldraw.c:(.text+0x49ef): undefined reference to `tkStubsPtr' htmldraw.o:htmldraw.c:(.text+0x4a37): undefined reference to `tkIntXlibStubsPtr' htmldraw.o:htmldraw.c:(.text+0x4a93): undefined reference to `tclStubsPtr' htmldraw.o:htmldraw.c:(.text+0x4c0a): more undefined references to `tclStubsPtr' follow htmldraw.o:htmldraw.c:(.text+0x4cd9): undefined reference to `tkStubsPtr' htmldraw.o:htmldraw.c:(.text+0x4e0f): undefined reference to `tclStubsPtr' htmldraw.o:htmldraw.c:(.text+0x4e38): more undefined references to `tclStubsPtr' follow htmldraw.o:htmldraw.c:(.text+0x55c4): undefined reference to `tkStubsPtr' htmldraw.o:htmldraw.c:(.text+0x55d5): undefined reference to `tkStubsPtr' htmldraw.o:htmldraw.c:(.text+0x566a): undefined reference to `tkStubsPtr' htmldraw.o:htmldraw.c:(.text+0x5754): undefined reference to `tkStubsPtr' htmldraw.o:htmldraw.c:(.text+0x57b8): undefined reference to `tkIntXlibStubsPtr' htmldraw.o:htmldraw.c:(.text+0x5847): undefined reference to `tkStubsPtr' htmldraw.o:htmldraw.c:(.text+0x58d7): more undefined references to `tkStubsPtr' follow [etc...] collect2.exe: error: ld returned 1 exit status make: *** [Makefile:273: libTkhtml3.0] Error 1
尝试手动添加文件后的新错误
手动下载对应文件放入C:\MinGW\lib后,出现新的链接错误:
c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../libtclstub86.a(tclStubLib.o):(.text+0x18): undefined reference to `__stack_chk_guard' c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../libtclstub86.a(tclStubLib.o):(.text+0xfa): undefined reference to `__stack_chk_guard' c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../libtclstub86.a(tclStubLib.o):(.text+0x1b2): undefined reference to `__stack_chk_fail' c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../libtkstub86.a(tkStubLib.o):(.text+0x8): undefined reference to `__stack_chk_guard' c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../libtkstub86.a(tkStubLib.o):(.text+0x106): undefined reference to `__stack_chk_guard' c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../libtkstub86.a(tkStubLib.o):(.text+0x21a): undefined reference to `__stack_chk_fail' collect2.exe: error: ld returned 1 exit status make: *** [Makefile:273: libTkhtml3.0] Error 1
求助需求
推测是缺少必要依赖,但不清楚具体依赖项及安装方法,可能还存在其他未知必需文件,希望得到可行的解决办法。
内容的提问来源于stack exchange,提问作者Zamyatin
相关产品推荐
相关产品推荐

