Question

I have trouble with gtk:

  1. I cloned from git: https://github.com/gtkd-developers/GtkD.git
  2. make & sudo make install
  3. added -I/usr/local/include/d to /etc/dmd.conf
  4. dmd main.d

Code:

//main.d 
import gtk.Main;
import gtk.MainWindow;

void main(string[] args)
{

} 

I get the error:

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
Was it helpful?

Solution

Interestingly enough, I had the same problem yesterday. For me, Ubuntu automatically slapped file permissions that denied everything for the 'others' group when I manually copied the source files to "/usr/include/dmd/gtkd". I guess the same thing probably happened to you. Quick fix: terminal -> "sudo chmod o=xr /usr/local/include/d". This is assuming that the gtkD source files are actually in your "/usr/local/include/d" directory.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top