Problems compiling sqlite-d

Nestor via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Jan 28 04:09:35 PST 2017


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 using a proxy which allows me to 
use only the browser, so I downloaded the git repository to a 
directory and made tests there. However finally I moved the 
library to the proper location, which in Windows 7 is this:

C:\Users\nestor\AppData\Roaming\dub\packages\sqlite-d-0.1.0

Now, when I tried build your default app, it complained about the 
path:

C:\>dub run sqlite-d
Building package sqlite-d in 
C:\Users\nestor\AppData\Roaming\dub\packages\sqlite-d-0.1.0\sqlite-d\
Performing "debug" build using dmd for x86.
sqlite-d ~master: building configuration "application"...
Linking...
Running 
.\Users\nestor\AppData\Roaming\dub\packages\sqlite-d-0.1.0\sqlite-d\sqlite-d.exe
opening file views/test-2.3.sqlite

std.file.FileException at std\file.d(358): views/test-2.3.sqlite: El 
sistema no puede encontrar la ruta especificada.
----------------
0x00425CC1 in @trusted bool 
std.file.cenforce!(bool).cenforce(bool, const(char)[], 
const(wchar)*, immutable(char)[], uint)
0x004074C2 in @safe void[] 
std.file.read!(immutable(char)[]).read(immutable(char)[], uint) 
at C:\dmd2\Windows\bin\..\..\src\phobos\std\file.d(228)
0x0040B947 in ref sqlited.Database 
sqlited.Database.__ctor(immutable(char)[], bool)
0x004022E9 in _Dmain at 
C:\Users\nestor\AppData\Roaming\dub\packages\sqlite-d-0.1.0\sqlite-d\source\app.d(19)
0x0041CC8B in 
D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv
0x0041CC4F in void rt.dmain2._d_run_main(int, char**, extern (C) 
int function(char[][])*).runAll()
0x0041CB50 in _d_run_main
0x00408644 in main at 
C:\Users\nestor\AppData\Roaming\dub\packages\sqlite-d-0.1.0\sqlite-d\source\api_user.d(7)
0x0045BC45 in mainCRTStartup
0x754733CA in BaseThreadInitThunk
0x77309ED2 in RtlInitializeExceptionChain
0x77309EA5 in RtlInitializeExceptionChain
Program exited with code 1

"El sistema no puede encontrar la ruta especificada" simply means 
"System can't find specified path"

However, it compiles correctly if I run the command from 
C:\Users\nestor\AppData\Roaming\dub\packages\sqlite-d-0.1.0\sqlite-d\

The second issue was perhaps related, I tried to make a new 
project using your library as a dependency:

{
	"name": "sqlite-test",
	"authors": [
		"Nestor Perez"
	],
	"dependencies": {
		"sqlite-d": "~>0.1.0"
	},
	"description": "Simple sqlite-d test application",
	"copyright": "Copyright (c) 2017, Nestor Perez",
	"license": "Boost"
}

However I get this error when i try to run dub:
Fetching sqlite-d 0.1.0 (getting selected version)...
Non-optional dependency sqlite-d of sqlite-test not found in 
dependency tree!?.

I also tried copying sqlite-d directory to source/ of my project, 
but same thing happens.

I confess I have no experience making new projects with dub, so 
if you can spare a little patience, what would be the proper way 
to use your library for a new project?


More information about the Digitalmars-d-learn mailing list