我遇到gtk
:
https://github.com/gtkd-developers/GtkD.git
make & sudo make install
-I/usr/local/include/d
添加到/etc/dmd.conf
dmd main.d
代码:
//main.d
import gtk.Main;
import gtk.MainWindow;
void main(string[] args)
{
}
我收到错误:
main.d(3): Error: module Main is in file 'gtk/Main.d' which cannot be read
import path[0] = /usr/include/dmd/phobos
import path[1] = /usr/include/dmd/druntime/import
import path[2] = /usr/local/include/d
答案 0 :(得分:1)
有趣的是,昨天我遇到了同样的问题。对我来说,当我手动将源文件复制到“/ usr / include / dmd / gtkd”时,Ubuntu会自动删除拒绝“其他”组所有内容的文件权限。我想同样的事情可能发生在你身上。快速修复:终端 - > “sudo chmod o = xr / usr / local / include / d”。这假设gtkD源文件实际上位于“/ usr / local / include / d”目录中。