- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在测试一个官方 tcl/tk sample 在 d语言 ,但在链接步骤失败。我在 Linux Mint 19 Cinamon 64 位 ,我至少已经安装了
...
class Application : TkdApplication // Extend TkdApplication.
{
private void exitCommand(CommandArgs args) // Create a callback.
{
this.exit(); // Exit the application.
}
override protected void initInterface() // Initialise user interface.
{
auto frame = new Frame(2, ReliefStyle.groove) // Create a frame.
.pack(10); // Place the frame.
auto label = new Label(frame, "Hello World!") // Create a label.
.pack(10); // Place the label.
auto exitButton = new Button(frame, "Exit") // Create a button.
.setCommand(&this.exitCommand) // Use the callback.
.pack(10); // Place the button.
}
}
...
$ dub
Performing "debug" build using /usr/bin/dmd for x86_64.
x11 1.0.21: target for configuration "tcltk-import" is up to date.
tcltk 8.6.5: target for configuration "library" is up to date.
tkd 1.1.10: target for configuration "library" is up to date.
hello-user ~master: building configuration "application"...
Linking...
/usr/bin/ld : ne peut trouver -ltcl
/usr/bin/ld : ne peut trouver -ltk
collect2: error: ld returned 1 exit status
Error: linker exited with status 1
/usr/bin/dmd failed with exit code 1.
{
"authors": [
"laurent bernabe"
],
"copyright": "Copyleft 2019, Laurent Bernabe",
"description": "Simple user greeting",
"license": "MIT",
"name": "hello-user",
"dependencies": {
"tkd": "~>1.1.10"
},
"postGenerateCommands-windows-x86": [
"copy $TCLTK_PACKAGE_DIR\\dist\\x86\\tcl86t.dll build\\tcl86t.dll /y",
"copy $TCLTK_PACKAGE_DIR\\dist\\x86\\tk86t.dll build\\tk86t.dll /y",
"xcopy $TCLTK_PACKAGE_DIR\\dist\\library build\\library /i /e /y"
],
"postGenerateCommands-windows-x86_64": [
"copy $TCLTK_PACKAGE_DIR\\dist\\x86_64\\tcl86t.dll build\\tcl86t.dll /y",
"copy $TCLTK_PACKAGE_DIR\\dist\\x86_64\\tk86t.dll build\\tk86t.dll /y",
"xcopy $TCLTK_PACKAGE_DIR\\dist\\library build\\library /i /e /y"
]
}
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/x86_64-linux-gnu
最佳答案
最后我成功了!
我创建了几个软链接(soft link):
sudo ln -s /usr/lib/x86_64-linux-gnu/libtcl8.6.a /usr/lib/libtcl.a
sudo ln -s /usr/lib/x86_64-linux-gnu/libtk8.6.a /usr/lib/libtk.a
sudo ln -s /usr/lib/x86_64-linux-gnu/libtcl8.6.so /usr/lib/libtcl.so
sudo ln -s /usr/lib/x86_64-linux-gnu/libtk8.6.so /usr/lib/libtk.so
dub
编译成功。
关于ubuntu - 为什么链接器找不到 tcl/tk?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55715458/
我想向 tk.Tk 和 tk.Toplevel 的实例添加 2 个方法。前者作为应用程序根窗口存在,后者由用户创建任意次数。每个 tk.Toplevel 代表应用程序的不同功能,目前有 13 种变体。
尝试创建 Listbox 的子类,以便我可以创建一个新的 KeyListbox from tkinter import * class KeyListbox(Listbox): def __
以下是错误: $ perl ftper.plUse of uninitialized value $id in hash element at /usr/lib/perl5/vendor_perl/5
我正在尝试使用 tk.Scale 来更改 tk.IntVar。我可以在第一个 tk 窗口上执行此操作,但不能在第二个窗口上执行。为什么? 看看这个可怜的样本: import tkinter as tk
我输入了我的框架比例,但我不确定如何在我的标签中显示这个比例的值。每次秤移动时我都需要更新它。我怎样才能做到这一点? self.options_settings.framepripojeni6 = F
这个video向我介绍了 X 的问题以及 Wayland 协议(protocol)的替代方案。多年来,Wayland 协议(protocol)的采用似乎在不断增长。 我的问题: tkinter 和 t
这些天我经常看到这一行:tk.Tk.__init__(self,*args,**kwargs)并且不明白它的用途。我的问题不是 *args 和 **kwargs)。 例如,在此处的这些代码行中: cl
这个问题涉及Python和Tkinter。 我想同时使用两个不同的 ttk 主题,例如一个 Tkinter 窗口中的“clam”和“vista”。所以我写了这个: import tkinter as
从 Tk 8.5 开始,Tk 开始使用基于原生的 UI 组件——按钮、滚动条等。我想知道 C++/Tk 是否支持这种原生 GUI 方法? 最佳答案 据我所知,C++/Tk 是基于 Tk 8.4(如果是
我无法让 ruby 成功地 require 'tk'。我正在使用 rvm、ruby 2.0.0、ActiveTcl-8.6 和 Ubuntu 12.04 LTS。我已经运行了随 ActiveTcl
我想用最有效的方式来限制用户不输入数字以外的任何内容。例如:当他们在条目中输入字母时,该条目将被清除。有没有什么方法可以用最少的结构改变来做到这一点? 这是我的代码:[??????标志是我被困的地方]
我真的很喜欢Perl/Tk ,但已经得出的意见认为它是 DOA。我认为 Tcl::Tk和 Tkx是更好的解决方案。假设我放弃 Perl/Tk . Tcl::Tk 是“最受支持”的路线吗? (自 200
我正在尝试使用 perl:latest 和 activestate/circleci-activeperl:latest 图像在 ubuntu:16.04 容器上运行使用 Tk 模块制作的简单 per
我曾经使用 tk.Scale 的 digits 属性来确保 Label 或 Spinbox 中的数字> 在 slider 移动时显示固定的小数位数。比如 3.456, 4444.567, 555555
问题就在标题中,本质上是:如何在设置 Entry 的 textvariable 后继续调用 validatecommand 回调?这是最低工作示例 (MWE): import tkinter as t
在Perl/Tk应用程序中,我想将带有任意Unicode文件名的文件拖放到小工具上。。有一个正在运行的DropSite示例:Windows资源管理器中的perl tk拖放文件夹,但它不能处理包含Uni
我在 macOS BigSur 上通过 VMWare 使用 Ubuntu 20.04.2 LTS。我安装了最新版本的 tcl、tcl-dev、tk 和 tk-dev - 版本 8.6。我想编译 Arc
我组装 Tk 窗口的方式有问题(在 Win XP 下使用 R tcltk 和 tcltk2) library(tcltk) library(tcltk2) expandTk <- function()
我想在 Textdocument 的特定行中写入,但我的代码有问题,我不知道错误在哪里。 set fp [open C:/Users/user/Desktop/tst/settings.txt w]
当在 TK 中创建新的顶层或按钮时,需要输入路径名。我看过一个基本代码,如下所示: toplevel .a ... button .a.b ... 我的问题是:点与字母的处理方式是否不同?它们是某种创
我是一名优秀的程序员,十分优秀!