Devisualization / window

Window creational toolkit, cross platform. Written in D.
MIT License
16 stars 2 forks source link

de_window isn't imported #13

Closed drug007 closed 9 years ago

drug007 commented 9 years ago

I try to use de_window 0.1.2: dub.json

{
        "name": "tdw",
        "description": "A minimal D application.",
        "copyright": "Copyright © 2015, drug",
        "authors": ["drug"],
        "dependencies": {
            "de_window": "~>0.1.2",
        }
}

app.d

import devisualization.window.window;
import std.stdio;

void main() {
    Window window = new Window(800, 600, "My window!"w);
    window.show();

    window.addOnDraw((Windowable window2) {
        writeln("drawing");
  });

  while(true) {
    import core.thread : Thread;
    import core.time : dur;
    Window.messageLoopIteration();

    if (window.hasBeenClosed)
        break;
    else
        window.onDraw();
    //Thread.sleep(dur!"msecs"(25));
  }
}

dub gives me the following:

drug@astra:~/tmp/tdw$ dub --compiler=gdc
Building tdw ~master configuration "application", build type debug.
Running gdc...
source/app.d:1:8: error: module window is in file 'devisualization/window/window.d' which cannot be read
 import devisualization.window.window;
        ^
import path[0] = /home/drug/bin/x86_64-gdcproject-linux-gnu/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/include/d
import path[1] = /home/drug/tmp/tdw/source
FAIL .dub/build/application-debug-linux.posix-x86_64-gdc-6D65EF1637CE6274FDA980F855B9CA61/ tdw executable
Error executing command run: gdc failed with exit code 1.

e.i. no import de_window into the project at all, only paths by default.

rikkimax commented 9 years ago

Use de_window:platform instead of de_window. platform sub package is the implementation of the interfaces sub package.

The package itself (not sub package) doesn't or at least shouldn't have any source code associated with it.

drug007 commented 9 years ago

Thanks! it works now.