View previous topic :: View next topic |
Author |
Message |
Alkhan
Joined: 07 Dec 2008 Posts: 4
|
Posted: Sun Dec 07, 2008 7:05 am Post subject: Compilation error of simple code |
|
|
Hi,
I've just installed ddbi, but when I try to compile the following code :
Code: |
module com.db.Test_DB;
import dbi.sqlite.SqliteDatabase;
void main() {
SqliteDatabase db;
}
|
I get this error:
Code: |
D:\worksapce\test> dsss build
WARNING: Section for nonexistant file Test_DB.d.
Creating imports for src
src => src
src\com\db\Test_DB.d(9): Error: identifier 'SqliteDatabase' is not defined
src\com\db\Test_DB.d(9): Error: SqliteDatabase is used as a type
src\com\db\Test_DB.d(9): variable com.db.Test_DB.main.db voids have no value
Command D:\compile\dsss\bin\rebuild.exe returned with code 1, aborti
ng.
Error: Command failed, aborting.
|
Any idees ?
Thanks in advance |
|
Back to top |
|
|
larsivi Site Admin
Joined: 27 Mar 2004 Posts: 453 Location: Trondheim, Norway
|
Posted: Sun Dec 07, 2008 8:00 am Post subject: |
|
|
Assuming you have checked out a version where there currently is sqlite support, you probably need to add -version=dbi_sqlite
Currently, there is no sqlite in trunk - but there isn't too much work left before I can commit it. |
|
Back to top |
|
|
larsivi Site Admin
Joined: 27 Mar 2004 Posts: 453 Location: Trondheim, Norway
|
Posted: Sun Dec 07, 2008 8:00 am Post subject: |
|
|
Assuming you have checked out a version where there currently is sqlite support, you probably need to add -version=dbi_sqlite
Currently, there is no sqlite in trunk - but there isn't too much work left before I can commit it. |
|
Back to top |
|
|
Alkhan
Joined: 07 Dec 2008 Posts: 4
|
Posted: Mon Dec 08, 2008 2:37 pm Post subject: |
|
|
I thank you for your answer!
the -version = dbi_sqlite resolves compilation errors, but now I have other errors :
Code: |
D:\>dsss build
Creating imports for classes/test
src\com => classes/test
Digital Mars Librarian Version 8.02n
Copyright (C) Digital Mars 2000-2007 All Rights Reserved
http://www.digitalmars.com/ctg/lib.html
Digital Mars Librarian complete.
Digital Mars Librarian Version 8.02n
Copyright (C) Digital Mars 2000-2007 All Rights Reserved
http://www.digitalmars.com/ctg/lib.html
Digital Mars Librarian complete.
src\com\db\Test_DB.d => classes/test
OPTLINK (R) for Win32 Release 8.00.1
Copyright (C) Digital Mars 1989-2004 All rights reserved.
D:\compile\dsss\lib\\dbi.lib(SqliteDatabase)
Error 42: Symbol Undefined _sqlite3_open
D:\compile\dsss\lib\\dbi.lib(SqliteDatabase)
Error 42: Symbol Undefined _D3dbi6sqlite11SqliteError17specificToGeneralFiZE3db
i9ErrorCode9ErrorCode
D:\compile\dsss\lib\\dbi.lib(SqliteDatabase)
Error 42: Symbol Undefined _sqlite3_close
D:\compile\dsss\lib\\dbi.lib(SqliteDatabase)
Error 42: Symbol Undefined _sqlite3_errmsg
D:\compile\dsss\lib\\dbi.lib(SqliteDatabase)
Error 42: Symbol Undefined _sqlite3_exec
D:\compile\dsss\lib\\dbi.lib(SqliteDatabase)
Error 42: Symbol Undefined _D3dbi6sqlite12SqliteResult12SqliteResult5_ctorMFPS3
dbi6sqlite3imp12sqlite3_stmtZC3dbi6sqlite12SqliteResult12SqliteResult
D:\compile\dsss\lib\\dbi.lib(SqliteDatabase)
Error 42: Symbol Undefined _sqlite3_prepare
D:\compile\dsss\lib\\dbi.lib(SqliteDatabase)
Error 42: Symbol Undefined _D3dbi6sqlite12SqliteResult12SqliteResult7__ClassZ
D:\compile\dsss\lib\\dbi.lib(SqliteDatabase)
Error 42: Symbol Undefined _sqlite3_errcode
D:\compile\dsss\lib\\dbi.lib(SqliteDatabase)
Error 42: Symbol Undefined _sqlite3_last_insert_rowid
D:\compile\dsss\lib\\dbi.lib(SqliteDatabase)
Error 42: Symbol Undefined _sqlite3_changes
--- errorlevel 11
Command D:\compile\dsss\bin\rebuild.exe returned with code -1, abort
ing.
Error: Command failed, aborting.
|
|
|
Back to top |
|
|
larsivi Site Admin
Joined: 27 Mar 2004 Posts: 453 Location: Trondheim, Norway
|
Posted: Mon Dec 08, 2008 3:35 pm Post subject: |
|
|
These messages mean that you need to add sqlite3.lib to the link line -L-lsqlite or something - not too familiar with windows here. |
|
Back to top |
|
|
Alkhan
Joined: 07 Dec 2008 Posts: 4
|
Posted: Tue Dec 09, 2008 11:52 am Post subject: |
|
|
thank you, now i can compile without error |
|
Back to top |
|
|
|