Version française
Home     About     Download     Resources     Contact us    
Browse thread
Error linking sqlite
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Flavio <sixdegreesoit@y...>
Subject: Error linking sqlite
Hello all,
I'm having problems compiling programs using sqlite library on debian 
unstable. Given the following code in file prova.ml:

let db = Sqlite.db_open "prova" in
Sqlite.db_close db

I can compile it in bytecode using

ocamlfind ocamlc -package sqlite -linkpkg prova.ml

without problems, but if I try to compile in native code with

ocamlfind ocamlopt -package sqlite -linkpkg prova.ml

I get

/usr/lib/ocaml/3.08.3/sqlite/libsqlite.a(sqlite_stubs.o): In function 
`raise_sqlite_error':
: undefined reference to `sqlite_freemem'
/usr/lib/ocaml/3.08.3/sqlite/libsqlite.a(sqlite_stubs.o): In function 
`caml_sqlite_close':
: undefined reference to `sqlite_close'
/usr/lib/ocaml/3.08.3/sqlite/libsqlite.a(sqlite_stubs.o): In function 
`caml_sqlite_finalize_gc':
: undefined reference to `sqlite_close'
/usr/lib/ocaml/3.08.3/sqlite/libsqlite.a(sqlite_stubs.o): In function 
`caml_sqlite_open':
: undefined reference to `sqlite_open'
/usr/lib/ocaml/3.08.3/sqlite/libsqlite.a(sqlite_stubs.o): In function 
`caml_sqlite_open':
: undefined reference to `sqlite_freemem'
/usr/lib/ocaml/3.08.3/sqlite/libsqlite.a(sqlite_stubs.o): In function 
`caml_sqlite_vm_finalize_gc':
: undefined reference to `sqlite_finalize'
/usr/lib/ocaml/3.08.3/sqlite/libsqlite.a(sqlite_stubs.o): In function 
`caml_sqlite_vm_finalize_gc':
: undefined reference to `sqlite_freemem'
/usr/lib/ocaml/3.08.3/sqlite/libsqlite.a(sqlite_stubs.o): In function 
`caml_sqlite_vm_finalize':
: undefined reference to `sqlite_finalize'
/usr/lib/ocaml/3.08.3/sqlite/libsqlite.a(sqlite_stubs.o): In function 
`caml_sqlite_vm_finalize':
: undefined reference to `sqlite_error_string'
/usr/lib/ocaml/3.08.3/sqlite/libsqlite.a(sqlite_stubs.o): In function 
`caml_sqlite_compile_helper':
: undefined reference to `sqlite_compile'
/usr/lib/ocaml/3.08.3/sqlite/libsqlite.a(sqlite_stubs.o): In function 
`caml_sqlite_compile_helper':
: undefined reference to `sqlite_error_string'
/usr/lib/ocaml/3.08.3/sqlite/libsqlite.a(sqlite_stubs.o): In function 
`caml_sqlite_step_helper':
: undefined reference to `sqlite_step'
/usr/lib/ocaml/3.08.3/sqlite/libsqlite.a(sqlite_stubs.o): In function 
`caml_sqlite_exec':
: undefined reference to `sqlite_exec'
/usr/lib/ocaml/3.08.3/sqlite/libsqlite.a(sqlite_stubs.o): In function 
`caml_sqlite_exec':
: undefined reference to `sqlite_error_string'
/usr/lib/ocaml/3.08.3/sqlite/libsqlite.a(sqlite_stubs.o): In function 
`caml_sqlite_last_insert_rowid':
: undefined reference to `sqlite_last_insert_rowid'
collect2: ld returned 1 exit status
Error during linking

Is this a bug in the debian package? I tried both libsqlite-ocaml-dev version  
0.3.5.arch.4-4 and version 0.3.5.arch.4-3

Many thanks,
Flavio

	

	
		
___________________________________ 
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB 
http://mail.yahoo.it