[Haskell-cafe] problems with HDBC

Kurt Norwood kortox at gmail.com
Tue Feb 15 09:21:58 CET 2011


Hi,

I am getting some very cryptic error messages while trying to compile some
simple code using hdbc. I am able to run the following lines in ghci without
any problems. I am using ghc 6.12.1 on Ubuntu 10.10.

Thanks in advance,
Kurt

##################
# Contents of the file
##################
import Database.HDBC.Sqlite3
import Database.HDBC

main = dosomething

dosomething :: IO ()
dosomething = do
    conn <- connectSqlite3 "testdb"
    run conn "create table test (id integer)" []
    run conn "insert into test (id) values (6)" []
    commit conn
    disconnect conn

##############
# Error message
##############
> ghc testsql.hs
testsql.o: In function `s1eF_info':
(.text+0x2e): undefined reference to
`HDBCzmsqlite3zm2zi3zi1zi0_DatabaseziHDBCziSqlite3ziConnectionImpl_zdfIConnectionConnection_closure'
testsql.o: In function `s1eG_info':
(.text+0x6e): undefined reference to
`HDBCzmsqlite3zm2zi3zi1zi0_DatabaseziHDBCziSqlite3ziConnectionImpl_zdfIConnectionConnection_closure'
testsql.o: In function `s1eJ_info':
(.text+0x16e): undefined reference to
`HDBCzmsqlite3zm2zi3zi1zi0_DatabaseziHDBCziSqlite3ziConnectionImpl_zdfIConnectionConnection_closure'
testsql.o: In function `s1eM_info':
(.text+0x272): undefined reference to
`HDBCzmsqlite3zm2zi3zi1zi0_DatabaseziHDBCziSqlite3ziConnectionImpl_zdfIConnectionConnection_closure'
testsql.o: In function `s1ho_info':
(.text+0x379): undefined reference to
`HDBCzmsqlite3zm2zi3zi1zi0_DatabaseziHDBCziSqlite3ziConnection_connectSqlite3_closure'
testsql.o: In function `s1ho_info':
(.text+0x489): undefined reference to
`__stginit_HDBCzm2zi2zi6zi1_DatabaseziHDBC_'
testsql.o: In function `s1ho_info':
(.text+0x493): undefined reference to
`__stginit_HDBCzmsqlite3zm2zi3zi1zi0_DatabaseziHDBCziSqlite3_'
testsql.o: In function `s1eF_info':
(.text+0x36): undefined reference to
`HDBCzm2zi2zi6zi1_DatabaseziHDBCziTypes_disconnect_info'
testsql.o: In function `s1eG_info':
(.text+0x76): undefined reference to
`HDBCzm2zi2zi6zi1_DatabaseziHDBCziTypes_commit_info'
testsql.o: In function `s1eJ_info':
(.text+0x176): undefined reference to
`HDBCzm2zi2zi6zi1_DatabaseziHDBCziTypes_run_info'
testsql.o: In function `s1eM_info':
(.text+0x27a): undefined reference to
`HDBCzm2zi2zi6zi1_DatabaseziHDBCziTypes_run_info'
testsql.o: In function `s1eN_srt':
(.data+0x8): undefined reference to
`HDBCzmsqlite3zm2zi3zi1zi0_DatabaseziHDBCziSqlite3ziConnectionImpl_zdfIConnectionConnection_closure'
testsql.o: In function `s1ho_srt':
(.data+0x18): undefined reference to
`HDBCzmsqlite3zm2zi3zi1zi0_DatabaseziHDBCziSqlite3ziConnection_connectSqlite3_closure'
collect2: ld returned 1 exit status
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20110215/c7b3b2f0/attachment.htm>


More information about the Haskell-Cafe mailing list