Assistance with DUB
Alfred Newman via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue Nov 1 15:01:23 PDT 2016
Greetings,
I need some help with dub libraries.
Executing "dub list" in my machine, I got the following:
Packages present in the system and known to dub:
colorize ~master:
C:\Users\Alfred\AppData\Roaming\dub\packages\colorize-master\colorize\
...
sqlite-d ~master:
C:\Users\Alfred\AppData\Roaming\dub\packages\sqlite-d-master\sqlite-d\
x11 1.0.15:
C:\Users\Alfred\AppData\Roaming\dub\packages\x11-1.0.15\x11\
*** Note that sqlite-d is listed there.
When I try to run the code in the end of this thread, I got the
following error:
compiling C:...\Projects\temp2.d
C:\Users\Alfred\Dropbox\Dlang\Projects\temp2.d(8,8): Error:
module sqlited is in file 'sqlited.d' which cannot be read (***)
import path[0] = C:\D\dmd2\src\phobos
import path[1] = C:\D\dmd2\src\druntime\import
import path[2] =
C:\Users\Alfred\AppData\Roaming\dub\packages\colorize-master\colorize\source
import path[3] =
C:\Users\Alfred\AppData\Roaming\dub\packages\sqlite-d-master\sqlite-d
import path[4] =
C:\Users\Alfred\AppData\Roaming\dub\packages\d2sqlite3-master\d2sqlite3\source
import path[5] = C:\D\dmd2\windows\bin....\src\phobos
import path[6] = C:\D\dmd2\windows\bin....\src\druntime\import
error: the process (dmd) has returned the signal 1
C:...\Projects\temp2.d has not been compiled
I'm stucked. Please, can you help me out ?
Cheers, AN
module test;
// Copyright Stefan Koch 2015 - 2018.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE.md or copy at
// http://www.boost.org/LICENSE_1_0.txt)
import sqlited;
import misc;
import sqlstuff;
static immutable long_create_table =
q{CREATE TABLE `hey` INTEGER,
`Field2` INTEGER
)};
static immutable test_s3db =
cast(immutable)Database(cast(immutable ubyte[])
import("test.s3db"));
static immutable Database.MasterTableSchema[] schemas =
readRows!(r =>
r.deserialize!(Database.MasterTableSchema))(test_s3db.rootPage,
test_s3db.pages);
static assert(schemas[2].sql==long_create_table);
import frail_sql_parser;
static assert (parseCreateTable(
q{CREATE TABLE spatial_ref_sys (
srid INTEGER NOT NULL PRIMARY KEY,
auth_name VARCHAR(256) NOT NULL,
auth_srid INTEGER NOT NULL,
ref_sys_name VARCHAR(256),
proj4text VARCHAR(2048) NOT NULL)}
) == TableInfo("spatial_ref_sys", [
ColumInfo("srid", "INTEGER", true, true),
ColumInfo("auth_name", "VARCHAR(256)", false, true),
ColumInfo("auth_srid", "INTEGER", false, true),
ColumInfo("ref_sys_name","VARCHAR(256)",false),
ColumInfo("proj4text","VARCHAR(2048)", false, true),
])
);
static assert(parseCreateTable(long_create_table) ==
TableInfo("hey", "INTEGER"), ColumInfo("Field2", "INTEGER")]));
static assert(parseCreateTable(
q{CREATE TABLE Towns (
PK_UID INTEGER PRIMARY KEY AUTOINCREMENT,
Name TEXT,
Peoples INTEGER,
LocalCounc INTEGER,
County INTEGER,
Region INTEGER, "Geometry" POINT)
}
) == TableInfo("Towns", [
ColumInfo("PK_UID", "INTEGER", true, false, false, true),
ColumInfo("Name", "TEXT"),
ColumInfo("Peoples", "INTEGER"),
ColumInfo("LocalCounc", "INTEGER"),
ColumInfo("County", "INTEGER"),
ColumInfo("Region", "INTEGER"),
ColumInfo("Geometry", "POINT")
])
);
More information about the Digitalmars-d-learn
mailing list