digitalmars.D.learn - kxml and dub package manager.
- holo (33/33) Oct 18 2015 I want to add xml support to my application so i fetched kxml
- drug (5/6) Oct 18 2015 Try
- holo (11/17) Oct 18 2015 Same:
- holo (4/4) Oct 18 2015 ok i fugure out it. When i do initiation i need to add
- Mike Parker (5/9) Oct 18 2015 No, you should never need to do that. I think your problem might
- holo (4/14) Oct 19 2015 Tried too with different name as i came to same idea and created
I want to add xml support to my application so i fetched kxml library with dub but it don't want to work for me. Steps and test code: [holo ultraxps kxml]$ cat dub.sdl name "kxml" description "A minimal D application." copyright "Copyright © 2015, holo" authors "holo" dependencies "kxml" version="1.0.0" [holo ultraxps kxml]$ dub run Performing "debug" build using dmd for x86_64. kxml ~master: building configuration "application"... source/app.d(1,8): Error: module kxml is in file 'kxml.d' which cannot be read import path[0] = source/ import path[1] = /usr/include/dlang/dmd dmd failed with exit code 1. [holo ultraxps kxml]$ cat source/app.d import kxml; import std.stdio; import std.file; struct instance { string id; string name; string type; string state; } void main() { } [holo ultraxps kxml]$ How to make dub to work for me?
Oct 18 2015
19.10.2015 02:57, holo пишет:How to make dub to work for me?Try ``` import kxml.xml; // instead of import kxml; ```
Oct 18 2015
On Monday, 19 October 2015 at 03:04:28 UTC, drug wrote:19.10.2015 02:57, holo пишет:Same: [holo ultraxps kxml]$ dub run Performing "debug" build using dmd for x86_64. kxml ~master: building configuration "application"... source/app.d(1,8): Error: module xml is in file 'kxml/xml.d' which cannot be read import path[0] = source/ import path[1] = /usr/include/dlang/dmd dmd failed with exit code 1. [holo ultraxps kxml]$How to make dub to work for me?Try ``` import kxml.xml; // instead of import kxml; ```
Oct 18 2015
ok i fugure out it. When i do initiation i need to add dependencies (thought it is enough to add them to sdl file). Proper initiation should look like that: dub init projectname kxml
Oct 18 2015
On Monday, 19 October 2015 at 03:33:18 UTC, holo wrote:ok i fugure out it. When i do initiation i need to add dependencies (thought it is enough to add them to sdl file). Proper initiation should look like that: dub init projectname kxmlNo, you should never need to do that. I think your problem might be related to the fact that in your dub.sdl you named your project "kxml". You shouldn't name a project the same as one of your dependencies.
Oct 18 2015
On Monday, 19 October 2015 at 06:20:19 UTC, Mike Parker wrote:On Monday, 19 October 2015 at 03:33:18 UTC, holo wrote:Tried too with different name as i came to same idea and created new one with other name. It was behaving that same, so it is not cause of problem.ok i fugure out it. When i do initiation i need to add dependencies (thought it is enough to add them to sdl file). Proper initiation should look like that: dub init projectname kxmlNo, you should never need to do that. I think your problem might be related to the fact that in your dub.sdl you named your project "kxml". You shouldn't name a project the same as one of your dependencies.
Oct 19 2015