tkd - basic compilation problem

via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Jun 30 06:17:27 PDT 2015


On Tuesday, 30 June 2015 at 12:58:21 UTC, Paul wrote:
> I downloaded the archive from 
> https://github.com/nomad-software/tkd and files are same as in 
> the git repo. Tcl/tk is installed on this machine (test 'hello 
> world' script works fine) but I get this error when compiling 
> the example from the github page:
>
> tkd/interpreter/tcl.d(16): Error: module tcl is in file 
> 'tcltk/tcl.d' which cannot be read
> import path[0] = /usr/include/dmd/phobos
> import path[1] = /usr/include/dmd/druntime/import
>
> As far as I can see there is no tcltk directory - can someone 
> tell me where I'm going wrong or if something is missing?
>
> TIA
>
> Paul

AFAICS tkd requires too additional libraries (bindings): tcltk 
and x11. Its easiest to
use DUB for building, it will download all required dependencies 
and pass the correct import paths to the compiler. The following 
works for me:

dub.json:
     {
         "name": "tkd-test-app",
         "dependencies": {
             "tkd": "~>1.1.4"
         }
     }

source/app.d:
     (the example program)

Running "dub" successfully builds and executes the example 
program.


More information about the Digitalmars-d-learn mailing list