Re: tkd - basic compilation problem

2015-07-02 Thread Gary Willoughby via Digitalmars-d-learn

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!


Re: tkd - basic compilation problem

2015-07-02 Thread Paul via Digitalmars-d-learn

On Thursday, 2 July 2015 at 17:41:45 UTC, Gary Willoughby wrote:


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


You're right, there's sufficient information there if using dub.


Re: tkd - basic compilation problem

2015-07-02 Thread Gary Willoughby via Digitalmars-d-learn

On Thursday, 2 July 2015 at 18:34:13 UTC, Paul wrote:

On Thursday, 2 July 2015 at 17:41:45 UTC, Gary Willoughby wrote:


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


You're right, there's sufficient information there if using dub.


Please read that page again.


Re: tkd - basic compilation problem

2015-07-01 Thread Jordi Sayol via Digitalmars-d-learn


El 30/06/15 a les 16:28, Paul via Digitalmars-d-learn ha escrit:
 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?


If you are in Debian, Ubuntu, Linuxmint, etc, you can use the d-apt repository:

http://d-apt.sourceforge.net/

There are deb packages for tkd:

$ sudo apt-get install libtkd-dev libtkd-doc

You can compile the example application included on libtkd-doc deb package to 
test if tkd is properly installed on your system:

For shared linking against libphobos2.so and libtkd.so:
$ dmd `pkg-config --cflags --libs tkd` -J/usr/share/libtkd-doc/example/media/ 
/usr/share/libtkd-doc/example/example.d

For static linking against libphobos2.a and libtkd.a:
$ dmd `pkg-config --cflags --libs tkd-static` 
-J/usr/share/libtkd-doc/example/media/ /usr/share/libtkd-doc/example/example.d

Best regards,
Jordi




Re: tkd - basic compilation problem

2015-07-01 Thread via Digitalmars-d-learn

On Wednesday, 1 July 2015 at 07:37:48 UTC, Paul wrote:

On Tuesday, 30 June 2015 at 16:06:41 UTC, Marc Schütz wrote:

On Tuesday, 30 June 2015 at 15:25:27 UTC, Alex Parrill wrote:

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?


You need to install the libraries. Ex `sudo apt-get install 
libtcl8.5 libtk8.5`


Or the corresponding -dev packages.


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.




Someone more familiar with Debian/Ubuntu than me may be able to 
help you here, sorry.


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 -dev packages are only required during development 
(specifically at link time), the resulting binary only needs the 
normal packages installed.


Re: tkd - basic compilation problem

2015-07-01 Thread Paul via Digitalmars-d-learn

On Wednesday, 1 July 2015 at 09:38:05 UTC, Marc Schütz wrote:
Someone more familiar with Debian/Ubuntu than me may be able to 
help you here, sorry.


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 -dev packages are only required during development 
(specifically at link time), the resulting binary only needs 
the normal packages installed.


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 fine now.


Re: tkd - basic compilation problem

2015-07-01 Thread Paul via Digitalmars-d-learn

On Wednesday, 1 July 2015 at 17:43:11 UTC, Gary Willoughby wrote:

On Tuesday, 30 June 2015 at 12:58:21 UTC, Paul wrote:

...


I really don't understand posts like this when literally all 
information needed is in the README file:


https://github.com/nomad-software/tkd

Just read RTFM.


I read that before posting, specifically the parts that say:

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.


and

On Linux and Mac OSX things are a little easier as both 
operating systems have Tcl/Tk installed by default. If however 
they do not have the latest version, the libraries can be updated 
via their respective package managers. The linked libraries are 
libtcl and libtk.


I can't see how they answer the questions I've asked (which 
admittedly are more related to the distro that D per se).






Re: tkd - basic compilation problem

2015-07-01 Thread Paul via Digitalmars-d-learn

On Wednesday, 1 July 2015 at 18:38:27 UTC, Jordi Sayol wrote:


For shared linking against libphobos2.so and libtkd.so:
$ dmd `pkg-config --cflags --libs tkd` 
-J/usr/share/libtkd-doc/example/media/ 
/usr/share/libtkd-doc/example/example.d


For static linking against libphobos2.a and libtkd.a:
$ dmd `pkg-config --cflags --libs tkd-static` 
-J/usr/share/libtkd-doc/example/media/ 
/usr/share/libtkd-doc/example/example.d



Thank you Jordi, I've got everything installed ok now but those 
linking instructions might come in very handy!


Re: tkd - basic compilation problem

2015-07-01 Thread Gary Willoughby via Digitalmars-d-learn

On Tuesday, 30 June 2015 at 12:58:21 UTC, Paul wrote:

...


I really don't understand posts like this when literally all 
information needed is in the README file:


https://github.com/nomad-software/tkd

Just read RTFM.


Re: tkd - basic compilation problem

2015-07-01 Thread Paul via Digitalmars-d-learn

On Tuesday, 30 June 2015 at 16:06:41 UTC, Marc Schütz wrote:

On Tuesday, 30 June 2015 at 15:25:27 UTC, Alex Parrill wrote:

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?


You need to install the libraries. Ex `sudo apt-get install 
libtcl8.5 libtk8.5`


Or the corresponding -dev packages.


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.


Re: tkd - basic compilation problem

2015-06-30 Thread Paul via Digitalmars-d-learn

On Tuesday, 30 June 2015 at 13:22:43 UTC, Paul wrote:

On Tuesday, 30 June 2015 at 13:19:25 UTC, Marc Schütz wrote:
If you don't want to use DUB, you need to download the other 
two packages from code.dlang.org and specifiy 
-I/path/to/tcltk -I/path/to/x11 -I/path/to/tkd in the DMD 
invocation.


Thank you, I'll try that.


Added info: I wanted to avoid using dub so I could manually 
figure out what would be required to distribute the application.


Re: tkd - basic compilation problem

2015-06-30 Thread Paul via Digitalmars-d-learn

On Tuesday, 30 June 2015 at 13:19:25 UTC, Marc Schütz wrote:
If you don't want to use DUB, you need to download the other 
two packages from code.dlang.org and specifiy -I/path/to/tcltk 
-I/path/to/x11 -I/path/to/tkd in the DMD invocation.


Thank you, I'll try that.


Re: tkd - basic compilation problem

2015-06-30 Thread via Digitalmars-d-learn
If you don't want to use DUB, you need to download the other two 
packages from code.dlang.org and specifiy -I/path/to/tcltk 
-I/path/to/x11 -I/path/to/tkd in the DMD invocation.


tkd - basic compilation problem

2015-06-30 Thread Paul via Digitalmars-d-learn
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




Re: tkd - basic compilation problem

2015-06-30 Thread via Digitalmars-d-learn

On Tuesday, 30 June 2015 at 15:25:27 UTC, Alex Parrill wrote:

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?


You need to install the libraries. Ex `sudo apt-get install 
libtcl8.5 libtk8.5`


Or the corresponding -dev packages.


Re: tkd - basic compilation problem

2015-06-30 Thread Alex Parrill via Digitalmars-d-learn

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?


You need to install the libraries. Ex `sudo apt-get install 
libtcl8.5 libtk8.5`


Re: tkd - basic compilation problem

2015-06-30 Thread via Digitalmars-d-learn

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.


Re: tkd - basic compilation problem

2015-06-30 Thread Paul via Digitalmars-d-learn

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?