提问人:Zamyatin 提问时间:11/5/2023 更新时间:11/5/2023 访问量:39
MinGW 没有 libtclstub.a 和 libtkstub.a 库,因此 TCL 不会编译
MinGW doesn't have the libtclstub.a and libtkstub.a libraries so TCL won't compile
问:
使用:Windows 10 64 位,在 Git Bash 上MINGW64。
我一直在尝试在 MinGW (https://sourceforge.net/projects/mingw/) 中编译一个 TCL 包(该包说要使用),但不包含 or ,因此无法编译该包。我是 MinGW 的新手,不知道如何添加它们。C:\MinGW\lib
libtclstub.a
libtkstub.a
当我在 Git Bash 中运行时,它只是打印:../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
我尝试从 https://github.com/git-for-windows/git-sdk-64/blob/main/mingw32/lib/libtclstub86.a 下载和下载(TK 相同),并将它们添加到 ,但随后得到:libtclstub.a
libtkstub.a
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
我想我还没有安装我应该拥有的东西,但我不完全确定那是什么,也不知道如何安装它。可能还有其他我不知道的文件,尽管这些文件可以与存根库一起安装。
答: 暂无答案
评论
C:\MinGW\libexec\mingw-get\guimain
mingw32-tcl
mingw32-tk
.0
.dll
gcc test.c -o test
gcc -c test.c -o test.o
gcc -o test.dll test.o -s -shared -Wl,--subsystem,windows