Thread overview | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
June 30, 2015 tkd - basic compilation problem | ||||
---|---|---|---|---|
| ||||
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 |
June 30, 2015 Re: tkd - basic compilation problem | ||||
---|---|---|---|---|
| ||||
Posted in reply to Paul | 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.
|
June 30, 2015 Re: tkd - basic compilation problem | ||||
---|---|---|---|---|
| ||||
Posted in reply to Marc Schütz | 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. |
June 30, 2015 Re: tkd - basic compilation problem | ||||
---|---|---|---|---|
| ||||
Posted in reply to Marc Schütz | 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.
|
June 30, 2015 Re: tkd - basic compilation problem | ||||
---|---|---|---|---|
| ||||
Posted in reply to Paul | 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.
|
June 30, 2015 Re: tkd - basic compilation problem | ||||
---|---|---|---|---|
| ||||
Posted in reply to Paul | 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? |
June 30, 2015 Re: tkd - basic compilation problem | ||||
---|---|---|---|---|
| ||||
Posted in reply to Paul | 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`
|
June 30, 2015 Re: tkd - basic compilation problem | ||||
---|---|---|---|---|
| ||||
Posted in reply to Alex Parrill | 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.
|
July 01, 2015 Re: tkd - basic compilation problem | ||||
---|---|---|---|---|
| ||||
Posted in reply to Marc Schütz | 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.
|
July 01, 2015 Re: tkd - basic compilation problem | ||||
---|---|---|---|---|
| ||||
Posted in reply to Paul | 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. |
Copyright © 1999-2021 by the D Language Foundation