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

Some problems when use DDBI

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



Joined: 28 Jan 2009
Posts: 3

PostPosted: Wed Feb 04, 2009 10:45 am    Post subject: Some problems when use DDBI Reply with quote

Tell me please, where I have a mistake?
I have downloaded DDBI src, from http://www.dsource.org/projects/ddbi/changeset/head/trunk?old_path=%2F&format=zip (MOST RECENT).
Then I do "dsss build -version=dbi_mysql & dsss install -version=dbi_mysql"
in the root ddbi src folder.
But when i try to compile test file with "dsss build mysql.d -version=dbi_mysql"
Code:

import dbi.mysql.MysqlDatabase;
void main()
{
}

There is some error :
Code:

[root@localhost cgi-bin]# dsss build mysql.d -version=dbi_mysql                 
mysql.d => mysql                                                               
WARNING: Module mysql.d does not have a module declaration. This can cause problems                                                                             
         with rebuild's -oq option. If an error occurs, fix this first.         
/usr/bin/../lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libdbi.a(dbi.mysql.MysqlDatabase.o): In function `_D3dbi5mysql13MysqlDatabase13MysqlDatabase5_ctorMFZC3dbi5mysql13MysqlDatabase13MysqlDatabase':                                           
MysqlDatabase.d:(.text+0x85): undefined reference to `mysql_init'               
/usr/bin/../lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libdbi.a(dbi.mysql.MysqlDatabase.o): In function `_D3dbi5mysql13MysqlDatabase13MysqlDatabase7connectMFAaAaAaHAaAaAE3dbi5model9Constants10DbiFeatureZv':                                   
MysqlDatabase.d:(.text+0x8bb): undefined reference to `mysql_real_connect'     
MysqlDatabase.d:(.text+0x8d0): undefined reference to `mysql_errno'             
/usr/bin/../lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libdbi.a(dbi.mysql.MysqlDatabase.o): In function `_D3dbi5mysql13MysqlDatabase13MysqlDatabase5closeMFZv':   
MysqlDatabase.d:(.text+0xc48): undefined reference to `mysql_close'             
MysqlDatabase.d:(.text+0xc5d): undefined reference to `mysql_errno'             
/usr/bin/../lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libdbi.a(dbi.mysql.MysqlDatabase.o): In function `_D3dbi5mysql13MysqlDatabase13MysqlDatabase6escapeMFAaAaZAa':                                                                             
MysqlDatabase.d:(.text+0xd73): undefined reference to `mysql_real_escape_string'
/usr/bin/../lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libdbi.a(dbi.mysql.MysqlDatabase.o): In function `_D3dbi5mysql13MysqlDatabase13MysqlDatabase7executeMFAaZv':                                                                               
MysqlDatabase.d:(.text+0xe0a): undefined reference to `mysql_real_query'       
/usr/bin/../lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libdbi.a(dbi.mysql.MysqlDatabase.o): In function `_D3dbi5mysql13MysqlDatabase13MysqlDatabase5queryMFAaZC3dbi5mysql11MysqlResult11MysqlResult':                                             
MysqlDatabase.d:(.text+0xec4): undefined reference to `mysql_store_result'     
/usr/bin/../lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libdbi.a(dbi.mysql.MysqlDatabase.o): In function `_D3dbi5mysql13MysqlDatabase13MysqlDatabase7prepareMFAaZC3dbi5mysql14MysqlStatement14MysqlStatement':                                     
MysqlDatabase.d:(.text+0xfae): undefined reference to `mysql_stmt_init'         
MysqlDatabase.d:(.text+0xfca): undefined reference to `mysql_stmt_prepare'     
MysqlDatabase.d:(.text+0xfe2): undefined reference to `mysql_stmt_error'       
MysqlDatabase.d:(.text+0xff0): undefined reference to `mysql_stmt_errno'       
/usr/bin/../lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libdbi.a(dbi.mysql.MysqlDatabase.o): In function `_D3dbi5mysql13MysqlDatabase13MysqlDatabase6tablesMFAaZC3dbi5mysql13MysqlDatabase11MysqlTables':                                         
MysqlDatabase.d:(.text+0x1149): undefined reference to `mysql_list_tables'     
MysqlDatabase.d:(.text+0x116b): undefined reference to `mysql_error'           
/usr/bin/../lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libdbi.a(dbi.mysql.MysqlDatabase.o): In function `_D3dbi5mysql13MysqlDatabase13MysqlDatabase8hasTableMFAaZb':                                                                             
MysqlDatabase.d:(.text+0x12a2): undefined reference to `mysql_list_tables'     
MysqlDatabase.d:(.text+0x12c4): undefined reference to `mysql_error'           
MysqlDatabase.d:(.text+0x1349): undefined reference to `mysql_num_rows'         
MysqlDatabase.d:(.text+0x135e): undefined reference to `mysql_free_result'     
/usr/bin/../lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libdbi.a(dbi.mysql.MysqlDatabase.o): In function `_D3dbi5mysql13MysqlDatabase13MysqlDatabase12lastInsertIDMFZm':                                                                           
MysqlDatabase.d:(.text+0x1383): undefined reference to `mysql_insert_id'       
/usr/bin/../lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libdbi.a(dbi.mysql.MysqlDatabase.o): In function `_D3dbi5mysql13MysqlDatabase13MysqlDatabase13beginTransactMFZv':                                                                         
MysqlDatabase.d:(.text+0x13b4): undefined reference to `mysql_real_query'       
/usr/bin/../lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libdbi.a(dbi.mysql.MysqlDatabase.o): In function `_D3dbi5mysql13MysqlDatabase13MysqlDatabase8rollbackMFZv':
MysqlDatabase.d:(.text+0x13d5): undefined reference to `mysql_rollback'         
/usr/bin/../lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libdbi.a(dbi.mysql.MysqlDatabase.o): In function `_D3dbi5mysql13MysqlDatabase13MysqlDatabase6commitMFZv': 
MysqlDatabase.d:(.text+0x13f6): undefined reference to `mysql_commit'           
/usr/bin/../lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libdbi.a(dbi.mysql.MysqlDatabase.o): In function `_D3dbi5mysql13MysqlDatabase10MysqlTable8metadataMFZAS3dbi5model6Result10ColumnInfo':                                                     
MysqlDatabase.d:(.text+0x196c): undefined reference to `mysql_real_query'       
MysqlDatabase.d:(.text+0x197d): undefined reference to `mysql_store_result'     
MysqlDatabase.d:(.text+0x198b): undefined reference to `mysql_fetch_fields'     
MysqlDatabase.d:(.text+0x1999): undefined reference to `mysql_num_fields'       
MysqlDatabase.d:(.text+0x19e4): undefined reference to `mysql_num_fields'       
MysqlDatabase.d:(.text+0x1b3a): undefined reference to `mysql_free_result'     
/usr/bin/../lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libdbi.a(dbi.mysql.MysqlDatabase.o): In function `_D3dbi5mysql13MysqlDatabase10MysqlTable4rowsMFZC3dbi5mysql11MysqlResult9MysqlRows':                                                     
MysqlDatabase.d:(.text+0x1ee8): undefined reference to `mysql_real_query'       
MysqlDatabase.d:(.text+0x1ef9): undefined reference to `mysql_store_result'     
MysqlDatabase.d:(.text+0x1f07): undefined reference to `mysql_num_rows'         
/usr/bin/../lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libdbi.a(dbi.mysql.MysqlStatement.o): In function `_D3dbi5mysql14MysqlStatement14MysqlStatement10paramCountMFZk':                                                                         
MysqlStatement.d:(.text+0x59): undefined reference to `mysql_stmt_param_count' 
/usr/bin/../lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libdbi.a(dbi.mysql.MysqlStatement.o): In function `_D3dbi5mysql14MysqlStatement14MysqlStatement7executeMFZv':                                                                             
MysqlStatement.d:(.text+0xed): undefined reference to `mysql_stmt_execute'     
/usr/bin/../lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libdbi.a(dbi.mysql.MysqlStatement.o): In function `_D3dbi5mysql14MysqlStatement14MysqlStatement7executeMFAPvXv':                                                                           
MysqlStatement.d:(.text+0xdab): undefined reference to `mysql_stmt_bind_param' 
MysqlStatement.d:(.text+0xe2a): undefined reference to `mysql_stmt_execute'     
MysqlStatement.d:(.text+0xe47): undefined reference to `mysql_stmt_errno'       
MysqlStatement.d:(.text+0xe58): undefined reference to `mysql_stmt_error'       
/usr/bin/../lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libdbi.a(dbi.mysql.MysqlStatement.o): In function `_D3dbi5mysql14MysqlStatement14MysqlStatement5fetchMFAPvXb':                                                                             
MysqlStatement.d:(.text+0x139d): undefined reference to `mysql_stmt_bind_result'
MysqlStatement.d:(.text+0x13bf): undefined reference to `mysql_stmt_fetch'     
/usr/bin/../lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libdbi.a(dbi.mysql.MysqlStatement.o): In function `_D3dbi5mysql14MysqlStatement14MysqlStatement5fetchMFAPvXb15__foreachbody16MFKkKAhZi':                                                   
MysqlStatement.d:(.text+0x1815): undefined reference to `mysql_stmt_fetch_column'                                                                               
/usr/bin/../lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libdbi.a(dbi.mysql.MysqlStatement.o): In function `_D3dbi5mysql14MysqlStatement14MysqlStatement5closeMFZv':
MysqlStatement.d:(.text+0x1c89): undefined reference to `mysql_stmt_close'     
/usr/bin/../lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libdbi.a(dbi.mysql.MysqlStatement.o): In function `_D3dbi5mysql14MysqlStatement14MysqlStatement5resetMFZv':
MysqlStatement.d:(.text+0x1cb4): undefined reference to `mysql_stmt_free_result'
/usr/bin/../lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libdbi.a(dbi.mysql.MysqlStatement.o): In function `_D3dbi5mysql14MysqlStatement14MysqlStatement12lastInsertIDMFZm':                                                                       
MysqlStatement.d:(.text+0x1cd5): undefined reference to `mysql_stmt_insert_id' 
/usr/bin/../lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libdbi.a(dbi.mysql.MysqlStatement.o): In function `_D3dbi5mysql14MysqlStatement14MysqlStatement8prefetchMFZv':                                                                             
MysqlStatement.d:(.text+0x1d00): undefined reference to `mysql_stmt_store_result'                                                                               
/usr/bin/../lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libdbi.a(dbi.mysql.MysqlStatement.o): In function `_D3dbi5mysql14MysqlStatement14MysqlStatement8rowCountMFZm':                                                                             
MysqlStatement.d:(.text+0x1d2f): undefined reference to `mysql_stmt_num_rows'   
/usr/bin/../lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libdbi.a(dbi.mysql.MysqlStatement.o): In function `_D3dbi5mysql14MysqlStatement14MysqlStatement10fieldCountMFZm':                                                                         
MysqlStatement.d:(.text+0x1d6c): undefined reference to `mysql_stmt_field_count'
/usr/bin/../lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libdbi.a(dbi.mysql.MysqlStatement.o): In function `_D3dbi5mysql14MysqlStatement14MysqlStatement12affectedRowsMFZm':                                                                       
MysqlStatement.d:(.text+0x1d92): undefined reference to `mysql_stmt_affected_rows'                                                                             
/usr/bin/../lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libdbi.a(dbi.mysql.MysqlStatement.o): In function `_D3dbi5mysql14MysqlStatement14MysqlStatement8metadataMFZAS3dbi5model6Result10ColumnInfo':                                               
MysqlStatement.d:(.text+0x1db4): undefined reference to `mysql_stmt_result_metadata'                                                                           
MysqlStatement.d:(.text+0x1de7): undefined reference to `mysql_num_fields'     
MysqlStatement.d:(.text+0x1e1a): undefined reference to `mysql_fetch_fields'   
MysqlStatement.d:(.text+0x1f91): undefined reference to `mysql_free_result'     
/usr/bin/../lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libdbi.a(dbi.mysql.MysqlResult.o): In function `_D3dbi5mysql11MysqlResult11MysqlResult8metadataMFZAS3dbi5model6Result10ColumnInfo':                                                       
MysqlResult.d:(.text+0x185): undefined reference to `mysql_fetch_fields'       
/usr/bin/../lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libdbi.a(dbi.mysql.MysqlResult.o): In function `_D3dbi5mysql11MysqlResult11MysqlResult8rowCountMFZm':     
MysqlResult.d:(.text+0x469): undefined reference to `mysql_num_rows'           
/usr/bin/../lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libdbi.a(dbi.mysql.MysqlResult.o): In function `_D3dbi5mysql11MysqlResult11MysqlResult10fieldCountMFZm':   
MysqlResult.d:(.text+0x48a): undefined reference to `mysql_num_fields'         
/usr/bin/../lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libdbi.a(dbi.mysql.MysqlResult.o): In function `_D3dbi5mysql11MysqlResult11MysqlResult5closeMFZv':         
MysqlResult.d:(.text+0x549): undefined reference to `mysql_free_result'         
MysqlResult.d:(.text+0x55a): undefined reference to `mysql_more_results'       
MysqlResult.d:(.text+0x576): undefined reference to `mysql_next_result'         
MysqlResult.d:(.text+0x5b8): undefined reference to `mysql_store_result'
MysqlResult.d:(.text+0x5ce): undefined reference to `mysql_free_result'
/usr/bin/../lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libdbi.a(dbi.mysql.MysqlResult.o): In function `_D3dbi5mysql11MysqlResult11MysqlResult4moreMFZb':
MysqlResult.d:(.text+0x67d): undefined reference to `mysql_more_results'
/usr/bin/../lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libdbi.a(dbi.mysql.MysqlResult.o): In function `_D3dbi5mysql11MysqlResult11MysqlResult4nextMFZC3dbi5mysql11MysqlResult11MysqlResult':
MysqlResult.d:(.text+0x71f): undefined reference to `mysql_free_result'
MysqlResult.d:(.text+0x730): undefined reference to `mysql_next_result'
MysqlResult.d:(.text+0x74a): undefined reference to `mysql_store_result'
/usr/bin/../lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libdbi.a(dbi.mysql.MysqlResult.o): In function `_D3dbi5mysql11MysqlResult9MysqlRows8metadataMFZAS3dbi5model6Result10ColumnInfo':
MysqlResult.d:(.text+0x95b): undefined reference to `mysql_fetch_fields'
/usr/bin/../lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libdbi.a(dbi.mysql.MysqlResult.o): In function `_D3dbi5mysql11MysqlResult9MysqlRows7opApplyMFDFKC3dbi5model6Result3RowZiZi':
MysqlResult.d:(.text+0xcb8): undefined reference to `mysql_fetch_row'
MysqlResult.d:(.text+0xce3): undefined reference to `mysql_fetch_lengths'
/usr/bin/../lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libdbi.a(dbi.mysql.MysqlResult.o): In function `_D3dbi5mysql11MysqlResult9MysqlRows4seekMFmZv':
MysqlResult.d:(.text+0xe55): undefined reference to `mysql_data_seek'
/usr/bin/../lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libdbi.a(dbi.mysql.MysqlResult.o): In function `_D3dbi5mysql11MysqlResult8MysqlRow7initRowMFZv':
MysqlResult.d:(.text+0xf47): undefined reference to `mysql_fetch_row'
MysqlResult.d:(.text+0xf60): undefined reference to `mysql_fetch_lengths'
collect2: ld returned 1 exit status
Command /usr/bin/rebuild returned with code 65280, aborting.
Error: Command failed, aborting.



What i do wrong?
Back to top
View user's profile Send private message
larsivi
Site Admin


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

PostPosted: Wed Feb 04, 2009 11:58 am    Post subject: Reply with quote

You also need to link the mysql client library, add

-L-lmysqlclient

to your command line (and make sure it is installed on your system).
Back to top
View user's profile Send private message
dervinar



Joined: 28 Jan 2009
Posts: 3

PostPosted: Mon Feb 09, 2009 1:09 pm    Post subject: Reply with quote

Thanks, it work) And one else question... How can i use DDBI with LDC?
_________________
I'm from Russia, so I'm sorry for my English.
Back to top
View user's profile Send private message
larsivi
Site Admin


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

PostPosted: Mon Feb 09, 2009 1:22 pm    Post subject: Reply with quote

DDBI is currently untested with LDC, but if there are issues they shouldn't be too difficult to resolve.

And don't worry about your English, it is perfectly fine Wink
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