tkd - basic compilation problem

Gary Willoughby via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Jul 2 10:41:44 PDT 2015


On Wednesday, 1 July 2015 at 19:45:04 UTC, Paul wrote:
> I can't see how they answer the questions I've asked.

Let me see.

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?

The following text is taken from:
https://github.com/nomad-software/tkd#source-code

Tkd requires other D source libraries to correctly use and link 
against pre-existing C libraries. The source dependencies are as 
follows:

* https://github.com/nomad-software/tcltk
* https://github.com/nomad-software/x11

Dub handles these automatically and during a build acquires them. 
While building, the tcltk repository is configured to link 
against the required Tcl/Tk libraries, hence they need to be 
installed for the application to function.

On Tuesday, 30 June 2015 at 14:28:49 UTC, Paul wrote:
> Using dub I get this during linking:
>
> Building tkd-test ~master configuration "application", build 
> type debug.
> Compiling using dmd...
> Linking...
> /usr/bin/ld: cannot find -ltcl
> /usr/bin/ld: cannot find -ltk
>
> ...any suggestions please?

The following text is taken from:
https://github.com/nomad-software/tkd#libraries

Tkd requires version 8.6 (or greater) of the Tcl/Tk libraries 
installed. A small exception is when creating a self-contained 
installation on Windows. See details below. Tcl/Tk itself 
requires the x11 libraries installed on Linux only.

On Wednesday, 1 July 2015 at 07:37:48 UTC, Paul wrote:
> Hmmm, I have libtcl8.6 and libtk8.6 installed already. The only 
> dev packages I see are tclcl and tclap - I can't find any libtk 
> -dev package.
>
> I was hoping to keep a tight rein on what was required to be 
> installed to simplify deployment but its spiraling out of 
> control again LOL.

The following text is taken from:
https://github.com/nomad-software/tkd#building

* It's recommended to use the dub build tool to build all Tkd 
projects.

On Wednesday, 1 July 2015 at 12:40:31 UTC, Paul wrote:
> Thanks Marc, I found the required packages... it threw me 
> because they don't have any version number in the repo ... and 
> the example works just

The following text is taken from:
https://github.com/nomad-software/tkd#libraries

Tkd requires version 8.6 (or greater) of the Tcl/Tk libraries 
installed. A small exception is when creating a self-contained 
installation on Windows. See details below. Tcl/Tk itself 
requires the x11 libraries installed on Linux only.

----

This is exactly why you use dub, so you don't have to worry about 
all this!


More information about the Digitalmars-d-learn mailing list