FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Compilation error of simple code

 
Post new topic   Reply to topic     Forum Index -> DDBI
View previous topic :: View next topic  
Author Message
Alkhan



Joined: 07 Dec 2008
Posts: 4

PostPosted: Sun Dec 07, 2008 7:05 am    Post subject: Compilation error of simple code Reply with quote

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
View user's profile Send private message
larsivi
Site Admin


Joined: 27 Mar 2004
Posts: 453
Location: Trondheim, Norway

PostPosted: Sun Dec 07, 2008 8:00 am    Post subject: Reply with quote

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
View user's profile Send private message
larsivi
Site Admin


Joined: 27 Mar 2004
Posts: 453
Location: Trondheim, Norway

PostPosted: Sun Dec 07, 2008 8:00 am    Post subject: Reply with quote

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
View user's profile Send private message
Alkhan



Joined: 07 Dec 2008
Posts: 4

PostPosted: Mon Dec 08, 2008 2:37 pm    Post subject: Reply with quote

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
View user's profile Send private message
larsivi
Site Admin


Joined: 27 Mar 2004
Posts: 453
Location: Trondheim, Norway

PostPosted: Mon Dec 08, 2008 3:35 pm    Post subject: Reply with quote

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
View user's profile Send private message
Alkhan



Joined: 07 Dec 2008
Posts: 4

PostPosted: Tue Dec 09, 2008 11:52 am    Post subject: Reply with quote

thank you, now i can compile without error
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> DDBI All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group