January 03
On Wednesday, 3 January 2018 at 20:52:49 UTC, Adam D. Ruppe wrote:

> That means you didn't link in the module.
>
> The way I recommend doing it is listing them all on the command line:
>
> dmd yourfile.d database.d sqlite.d
>
> or if you put them in an arsd folder (optional)
>
> dmd yourfile.d arsd\database.d arsd\sqlite.d
>
>
>
> For sqlite, you also will need a sqlite.lib in the current directory or it will list a lot of Symbol Undefined like _sqlite3_open etc. And at runtime, you will need the sqlite.dll file along with your exe.
>
> This is probably your general problem: you need to link in those libs too.
>
> Here's the sqlite3.lib and dll too if you don't already have them:
>
> http://arsdnet.net/dcode/sqlite3.lib
> http://arsdnet.net/dcode/sqlite3.dll
>
> just download them to the folder with your program.

thank you.
finally i am able to do it in correct way.
(i think if there be only one way to do something wrong, it will happen to me :))
January 03
On Wednesday, 3 January 2018 at 20:54:50 UTC, Adam D. Ruppe wrote:
>
>
> These are just for Windows btw (and for that, only 32 bit. if you are building 64 bit that is different, I have never used sqlite on 64 bit windows. but 32 bit is usually good enough anyway)
>
> On Linux, you just need to make sure the sqlite3-devel package is installed. I think that's what it is called too, so apt-get install sqlite3-devel. if not it might suggest the right name

yes, i agree. 32 bit will work very well. why bother with 64.
once i was greedy about using massive and most up to date hardware.
you know, it doesn't matter how much resources someone have, if he don't know how to use it, it will never be enough.
then i enter the embedded(micro-controller). the world has changed since that. :)

January 03
On Wednesday, 3 January 2018 at 21:12:54 UTC, wakhshti wrote:
> On Wednesday, 3 January 2018 at 16:38:27 UTC, Craig Dillabaugh wrote:
>> On Wednesday, 3 January 2018 at 12:14:19 UTC, wakhshti wrote:
>>>
clip


> this is main.d content:
>
>>import std.stdio;
>>import sqlite;
>>
>>void main(string[] args){
>>
>>	auto db = new SQLite3("datafile.db");
>>
>>}
>
> when i run :
>>dmd main.d
> i get this error:
>
> D:\ashit\document\DlangIDE\database\db>dmd main.d
> OPTLINK (R) for Win32  Release 8.00.17
> Copyright (C) Digital Mars 1989-2013  All rights reserved.
> http://www.digitalmars.com/ctg/optlink.html
> main.obj(main)
>  Error 42: Symbol Undefined _D6sqlite7SQLite36__ctorMFAyaZCQBdQz
> main.obj(main)
>  Error 42: Symbol Undefined _D6sqlite7SQLite37__ClassZ
> Error: linker exited with status 2
>
>
> what to do ?
> i also downloaded new dmd but nothing seems going well.

Looks like you are up and running with Adam's stuff, but if you wanted to use the sqlite3 library I would suggest you use 'dub' to do the build as sqlite3 is in code.dlang.org.  An example form my own project:

dub.sdl
---------------------------------------------------------
name "blah"
description "An application that uses sqlite3 library.."
authors "Craig Dillabaugh"
copyright "Copyright © 2017, Craig Dillabaugh"
license "Whatever"
dependency "sqlite3" version="~>1.0.0"



January 04
On Wednesday, 3 January 2018 at 23:51:23 UTC, Craig Dillabaugh wrote:

> Looks like you are up and running with Adam's stuff, but if you wanted to use the sqlite3 library I would suggest you use 'dub' to do the build as sqlite3 is in code.dlang.org.  An example form my own project:
>
> dub.sdl
> ---------------------------------------------------------
> name "blah"
> description "An application that uses sqlite3 library.."
> authors "Craig Dillabaugh"
> copyright "Copyright © 2017, Craig Dillabaugh"
> license "Whatever"
> dependency "sqlite3" version="~>1.0.0"


now, i can run this too (the same way Adam noted).

thank you all ...
January 04
On 2018-01-03 13:14, wakhshti wrote:

> and also what about a simple GUI library ? (once there was a library named DFL, but i never could get it to run).

For a GUI library you can give DWT [1] a try. Works on Linux and Windows and is using native drawing operations.

[1] https://github.com/d-widget-toolkit/dwt

-- 
/Jacob Carlborg
January 04
On Thursday, 4 January 2018 at 09:59:08 UTC, Jacob Carlborg wrote:
> On 2018-01-03 13:14, wakhshti wrote:
>
>> and also what about a simple GUI library ? (once there was a library named DFL, but i never could get it to run).
>
> For a GUI library you can give DWT [1] a try. Works on Linux and Windows and is using native drawing operations.
>
> [1] https://github.com/d-widget-toolkit/dwt


it is not compiling:

>
>C:\Users\wakhshti\Downloads\dwt-master>rdmd base swt -m32mscoff
>Error: module base is in file 'base.d' which cannot be read
>import path[0] = .
>import path[1] = C:\D\dmd2\windows\bin\..\..\src\phobos
>import path[2] = C:\D\dmd2\windows\bin\..\..\src\druntime\import
>Failed: ["dmd", "-v", "-o-", "base.d", "-I."]
>


January 04
On 2018-01-04 13:48, wakhshti wrote:

> it is not compiling:
> 
>>
>> C:\Users\wakhshti\Downloads\dwt-master>rdmd base swt -m32mscoff
>> Error: module base is in file 'base.d' which cannot be read
>> import path[0] = .
>> import path[1] = C:\D\dmd2\windows\bin\..\..\src\phobos
>> import path[2] = C:\D\dmd2\windows\bin\..\..\src\druntime\import
>> Failed: ["dmd", "-v", "-o-", "base.d", "-I."]

Looks like the readme is wrong. It should be:

rdmd build base swt -m32mscoff

-- 
/Jacob Carlborg
January 04
On 2018-01-04 15:39, Jacob Carlborg wrote:

> Looks like the readme is wrong. It should be:
> 
> rdmd build base swt -m32mscoff

I've corrected the readme now.

-- 
/Jacob Carlborg
Next ›   Last »
1 2