Problems compiling sqlite-d

Nestor via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Jan 29 16:06:00 PST 2017


On Sunday, 29 January 2017 at 17:36:45 UTC, Adam D. Ruppe wrote:
> On Sunday, 29 January 2017 at 16:26:30 UTC, Nestor wrote:
>>> dmd yourfile.d database.d sqlite.d
>> I have just tried your way and I get some errors:
>>  Error 42: Symbol Undefined 
>> _D4arsd8database3Row7opIndexMFkAyaiZAya
>
> Are you sure you passed those two database.d and sqlite.d 
> modules to the compiler?

I wasn't doing it explicitly. However I just did that and still 
encountered a few errors, which I removed with this patch:

--- original\sqlite.d	2017-01-29 10:53:35 -0100
+++ modified\sqlite.d	2017-01-29 19:00:23 -0100
@@ -22 +22,2 @@
-import std.c.stdlib;
+import core.stdc.string : strlen;
+import core.stdc.stdlib : malloc, free;
@@ -143 +144 @@
-		sizediff_t a = std.c.string.strlen(mesg);
+		sizediff_t a = strlen(mesg);
@@ -164 +165 @@
-			sizediff_t a = std.c.string.strlen(mesg);
+			sizediff_t a = strlen(mesg);
@@ -285 +286 @@
-					sizediff_t l = std.c.string.strlen(str);
+					sizediff_t l = strlen(str);
@@ -335 +336 @@
-						sizediff_t l = std.c.string.strlen(str);
+						sizediff_t l = strlen(str);
@@ -558 +559 @@
-		p = std.c.stdlib.malloc(sz);
+		p = malloc(sz);
@@ -569 +570 @@
-		    std.c.stdlib.free(p);
+		    free(p);
@@ -626 +627 @@
-		sizediff_t b = std.c.string.strlen(columns[a]);
+		sizediff_t b = strlen(columns[a]);
@@ -632 +633 @@
-		sizediff_t d = std.c.string.strlen(text[a]);
+		sizediff_t d = strlen(text[a]);

However a couple of errors remain with database.d which I don't 
know how to fix:

arsd\database.d(644): Error: function std.json.JSONValue.type () 
const is not callable using argument types (JSON_TYPE)
arsd\database.d(647): Error: function std.json.JSONValue.type () 
const is not callable using argument types (JSON_TYPE)



More information about the Digitalmars-d-learn mailing list