Problems compiling sqlite-d

2017-01-27 Thread Nestor via Digitalmars-d-learn
Hi, I was trying to use https://github.com/UplinkCoder/sqlite-d Unfortunately even something as simple as this doesn´t compile (at least on Windows): import std.stdio, sqlited; void main(string[] args) { string filename = (args.length == 2 ? args[1] : "data.db"); Database db = Database(f

Re: Problems compiling sqlite-d

2017-01-27 Thread Stefan Koch via Digitalmars-d-learn
On Friday, 27 January 2017 at 12:01:30 UTC, Nestor wrote: Hi, I was trying to use https://github.com/UplinkCoder/sqlite-d Unfortunately even something as simple as this doesn´t compile (at least on Windows): import std.stdio, sqlited; void main(string[] args) { string filename = (args.len

Re: Problems compiling sqlite-d

2017-01-27 Thread Stefan Koch via Digitalmars-d-learn
On Friday, 27 January 2017 at 12:04:06 UTC, Stefan Koch wrote: I take it you build without dub ? Have you specified source/sqlite.d on your compile commandline ? That was supposed to say. sqlite-d/source/sqlited.d Please feel free to post here or contact me directly regarding the usage of sq

Re: Problems compiling sqlite-d

2017-01-27 Thread Nestor via Digitalmars-d-learn
On Friday, 27 January 2017 at 12:06:33 UTC, Stefan Koch wrote: On Friday, 27 January 2017 at 12:04:06 UTC, Stefan Koch wrote: I take it you build without dub ? Have you specified source/sqlite.d on your compile commandline ? That was supposed to say. sqlite-d/source/sqlited.d Please feel fr

Re: Problems compiling sqlite-d

2017-01-27 Thread Stefan Koch via Digitalmars-d-learn
On Friday, 27 January 2017 at 12:21:29 UTC, Nestor wrote: On Friday, 27 January 2017 at 12:06:33 UTC, Stefan Koch wrote: On Friday, 27 January 2017 at 12:04:06 UTC, Stefan Koch wrote: I take it you build without dub ? Have you specified source/sqlite.d on your compile commandline ? That was

Re: Problems compiling sqlite-d

2017-01-28 Thread Nestor via Digitalmars-d-learn
On Friday, 27 January 2017 at 12:55:55 UTC, Stefan Koch wrote: You have to compile the library with your app. or better yet use dub replace app.d with your app.d and run dub Thanks. It did compile using dub, though I had a couple of issues with dub, by the way. The first occured because I am

Re: Problems compiling sqlite-d

2017-01-28 Thread Adam D. Ruppe via Digitalmars-d-learn
On Friday, 27 January 2017 at 12:01:30 UTC, Nestor wrote: Is there any other native D implementation of sqlite reader? My sqlite.d and database.d from here can do it too: https://github.com/adamdruppe/arsd Just download those two files and compile them together with your file: dmd yourfile.

Re: Problems compiling sqlite-d

2017-01-28 Thread Stefan Koch via Digitalmars-d-learn
On Saturday, 28 January 2017 at 19:01:48 UTC, Adam D. Ruppe wrote: On Friday, 27 January 2017 at 12:01:30 UTC, Nestor wrote: Is there any other native D implementation of sqlite reader? My sqlite.d and database.d from here can do it too: https://github.com/adamdruppe/arsd Just download those

Re: Problems compiling sqlite-d

2017-01-28 Thread Stefan Koch via Digitalmars-d-learn
On Saturday, 28 January 2017 at 12:09:35 UTC, Nestor wrote: On Friday, 27 January 2017 at 12:55:55 UTC, Stefan Koch wrote: [...] Thanks. It did compile using dub, though I had a couple of issues with dub, by the way. [...] I think you have to remove the app.d that comes with sqlite-d fil

Re: Problems compiling sqlite-d

2017-01-28 Thread Adam D. Ruppe via Digitalmars-d-learn
On Saturday, 28 January 2017 at 21:03:08 UTC, Stefan Koch wrote: It's not native though. It's a mistake to ask for native D implementations of mature C libraries, especially a public domain one like sqlite. There's just no advantage in production use to rewrite it.

Re: Problems compiling sqlite-d

2017-01-28 Thread Nestor via Digitalmars-d-learn
On Sunday, 29 January 2017 at 00:14:02 UTC, Adam D. Ruppe wrote: On Saturday, 28 January 2017 at 21:03:08 UTC, Stefan Koch wrote: It's not native though. It's a mistake to ask for native D implementations of mature C libraries, especially a public domain one like sqlite. There's just no adva

Re: Problems compiling sqlite-d

2017-01-28 Thread Ali Çehreli via Digitalmars-d-learn
On 01/28/2017 04:14 PM, Adam D. Ruppe wrote: On Saturday, 28 January 2017 at 21:03:08 UTC, Stefan Koch wrote: It's not native though. It's a mistake to ask for native D implementations of mature C libraries, especially a public domain one like sqlite. There's just no advantage in production us

Re: Problems compiling sqlite-d

2017-01-28 Thread Nestor via Digitalmars-d-learn
On Saturday, 28 January 2017 at 21:09:25 UTC, Stefan Koch wrote: On Saturday, 28 January 2017 at 12:09:35 UTC, Nestor wrote: On Friday, 27 January 2017 at 12:55:55 UTC, Stefan Koch wrote: [...] Thanks. It did compile using dub, though I had a couple of issues with dub, by the way. [...]

Re: Problems compiling sqlite-d

2017-01-28 Thread Stefan Koch via Digitalmars-d-learn
On Sunday, 29 January 2017 at 01:47:44 UTC, Nestor wrote: On Saturday, 28 January 2017 at 21:09:25 UTC, Stefan Koch wrote: On Saturday, 28 January 2017 at 12:09:35 UTC, Nestor wrote: On Friday, 27 January 2017 at 12:55:55 UTC, Stefan Koch wrote: [...] Thanks. It did compile using dub, though

Re: Problems compiling sqlite-d

2017-01-28 Thread Nestor via Digitalmars-d-learn
On Sunday, 29 January 2017 at 01:53:30 UTC, Stefan Koch wrote: On Sunday, 29 January 2017 at 01:47:44 UTC, Nestor wrote: On Saturday, 28 January 2017 at 21:09:25 UTC, Stefan Koch wrote: On Saturday, 28 January 2017 at 12:09:35 UTC, Nestor wrote: On Friday, 27 January 2017 at 12:55:55 UTC, Stefa

Re: Problems compiling sqlite-d

2017-01-28 Thread Adam D. Ruppe via Digitalmars-d-learn
On Sunday, 29 January 2017 at 01:02:07 UTC, Ali Çehreli wrote: Agreed but there can be happy surprises. :) Just because it's fresh in my mind: Jon Degenhardt implemented D versions of existing C, Go, and Rust tool kits in D and saw 3 to 10 times performance increase in many cases (not all). Y

Re: Problems compiling sqlite-d

2017-01-28 Thread Adam D. Ruppe via Digitalmars-d-learn
On Sunday, 29 January 2017 at 00:36:34 UTC, Nestor wrote: Well, native implementations are useful at least for building self-contained applications. Sometimes true, but sqlite can be easily embedded and statically linked, so your binary is still self-contained, there's just a small compile ti

Re: Problems compiling sqlite-d

2017-01-28 Thread Nestor via Digitalmars-d-learn
On Sunday, 29 January 2017 at 02:55:04 UTC, Adam D. Ruppe wrote: On Sunday, 29 January 2017 at 00:36:34 UTC, Nestor wrote: Well, native implementations are useful at least for building self-contained applications. Sometimes true, but sqlite can be easily embedded and statically linked, so you

Re: Problems compiling sqlite-d

2017-01-28 Thread Stefan Koch via Digitalmars-d-learn
On Sunday, 29 January 2017 at 02:59:12 UTC, Nestor wrote: On Sunday, 29 January 2017 at 02:55:04 UTC, Adam D. Ruppe wrote: On Sunday, 29 January 2017 at 00:36:34 UTC, Nestor wrote: Well, native implementations are useful at least for building self-contained applications. Sometimes true, but s

Re: Problems compiling sqlite-d

2017-01-28 Thread Nestor via Digitalmars-d-learn
On Sunday, 29 January 2017 at 03:11:34 UTC, Stefan Koch wrote: On Sunday, 29 January 2017 at 02:59:12 UTC, Nestor wrote: On Sunday, 29 January 2017 at 02:55:04 UTC, Adam D. Ruppe wrote: On Sunday, 29 January 2017 at 00:36:34 UTC, Nestor wrote: Well, native implementations are useful at least fo

Re: Problems compiling sqlite-d

2017-01-28 Thread Stefan Koch via Digitalmars-d-learn
On Sunday, 29 January 2017 at 04:13:17 UTC, Nestor wrote: On Sunday, 29 January 2017 at 03:11:34 UTC, Stefan Koch wrote: On Sunday, 29 January 2017 at 02:59:12 UTC, Nestor wrote: On Sunday, 29 January 2017 at 02:55:04 UTC, Adam D. Ruppe wrote: [...] In the case of Windows, where libraries ar

Re: Problems compiling sqlite-d

2017-01-29 Thread Nestor via Digitalmars-d-learn
On Saturday, 28 January 2017 at 19:01:48 UTC, Adam D. Ruppe wrote: On Friday, 27 January 2017 at 12:01:30 UTC, Nestor wrote: Is there any other native D implementation of sqlite reader? My sqlite.d and database.d from here can do it too: https://github.com/adamdruppe/arsd Just download those

Re: Problems compiling sqlite-d

2017-01-29 Thread Adam D. Ruppe via Digitalmars-d-learn
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

Re: Problems compiling sqlite-d

2017-01-29 Thread Nestor via Digitalmars-d-learn
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

Re: Problems compiling sqlite-d

2017-01-29 Thread Adam D. Ruppe via Digitalmars-d-learn
On Monday, 30 January 2017 at 00:06:00 UTC, Nestor wrote: I wasn't doing it explicitly. However I just did that and still encountered a few errors, which I removed with this patch: Where did you get that ancient version? The latest versions of the files work just fine out of the box, and they

Re: Problems compiling sqlite-d

2017-01-29 Thread Nestor via Digitalmars-d-learn
On Monday, 30 January 2017 at 02:25:40 UTC, Adam D. Ruppe wrote: On Monday, 30 January 2017 at 00:06:00 UTC, Nestor wrote: I wasn't doing it explicitly. However I just did that and still encountered a few errors, which I removed with this patch: Where did you get that ancient version? The lat

Re: Problems compiling sqlite-d

2017-01-29 Thread Adam D. Ruppe via Digitalmars-d-learn
On Monday, 30 January 2017 at 02:46:34 UTC, Nestor wrote: Well, I had downloaded the github version a few days back but yesterday managed to get dub to fetch properly, so I just fetched package arsd, and took the units from there. Oh, that is ancient and not even mine - I don't have access to

Re: Problems compiling sqlite-d

2017-01-30 Thread Nestor via Digitalmars-d-learn
On Monday, 30 January 2017 at 03:07:22 UTC, Adam D. Ruppe wrote: If I specify all source files, there are even more problems: Error 42: Symbol Undefined _sqlite3_open It apparently couldn't find sqlite3.lib. Files sqlite3.{def|dll|lib} are on both source/ and source/arsd/ (just in case) Tr