For this package, gosqlite: trivial sqlite3 binding for Go http://code.google.com/p/gosqlite/ compiling this program, package main ...
14 years, 3 months ago
(2010-12-26 00:28:17 UTC)
#2
For this package,
gosqlite: trivial sqlite3 binding for Go
http://code.google.com/p/gosqlite/
compiling this program,
package main
import (
"fmt"
sqlite "gosqlite"
)
func main() {
db, err := sqlite.Open("gosqlite.db")
fmt.Println(db, err)
}
fails when linking,
$ 8l gosqlite.8
adddynlib: unsupported binary format
adddynlib: unsupported binary format
p:/cgo/pkg/windows_386/gosqlite.a(sqlite.cgo2.o): elf object but not 386
p:/cgo/pkg/windows_386/gosqlite.a(_cgo_export.o): elf object but not 386
gosqlite._Cfunc_sqlite3_column_count: _cgo_a211002cfcb2_Cfunc_sqlite3_column_cou
nt: not defined
gosqlite._Cfunc_my_bind_text: _cgo_a211002cfcb2_Cfunc_my_bind_text: not defined
gosqlite._Cfunc_sqlite3_bind_parameter_count: _cgo_a211002cfcb2_Cfunc_sqlite3_bi
nd_parameter_count: not defined
gosqlite._Cfunc_sqlite3_step: _cgo_a211002cfcb2_Cfunc_sqlite3_step: not defined
gosqlite._Cfunc_sqlite3_column_bytes: _cgo_a211002cfcb2_Cfunc_sqlite3_column_byt
es: not defined
gosqlite._Cfunc_my_bind_blob: _cgo_a211002cfcb2_Cfunc_my_bind_blob: not defined
gosqlite._Cfunc_sqlite3_errmsg: _cgo_a211002cfcb2_Cfunc_sqlite3_errmsg: not defi
ned
gosqlite._Cfunc_sqlite3_reset: _cgo_a211002cfcb2_Cfunc_sqlite3_reset: not define
d
gosqlite._Cfunc_sqlite3_close: _cgo_a211002cfcb2_Cfunc_sqlite3_close: not define
d
gosqlite._Cfunc_sqlite3_column_blob: _cgo_a211002cfcb2_Cfunc_sqlite3_column_blob
: not defined
gosqlite._Cfunc_sqlite3_open_v2: _cgo_a211002cfcb2_Cfunc_sqlite3_open_v2: not de
fined
gosqlite._Cfunc_sqlite3_finalize: _cgo_a211002cfcb2_Cfunc_sqlite3_finalize: not
defined
gosqlite._Cfunc_free: _cgo_a211002cfcb2_Cfunc_free: not defined
gosqlite._Cfunc_sqlite3_prepare_v2: _cgo_a211002cfcb2_Cfunc_sqlite3_prepare_v2:
not defined
gosqlite._Cfunc_sqlite3_threadsafe: _cgo_a211002cfcb2_Cfunc_sqlite3_threadsafe:
not defined
.windynamic: _cgo_a211002cfcb2_Cfunc_sqlite3_errmsg(0): not defined
.windynamic: _cgo_a211002cfcb2_Cfunc_sqlite3_reset(0): not defined
too many errors
I test gosqlite with share lib, it works for me. download sqlite3.dll from http://www.sqlite.org/sqlite-dll-win32-x86-3070400.zip unzip ...
14 years, 3 months ago
(2010-12-26 02:21:22 UTC)
#4
I test gosqlite with share lib, it works for me.
download sqlite3.dll from
http://www.sqlite.org/sqlite-dll-win32-x86-3070400.zip
unzip
dlltool -d sqlite3.def -l libsqlite3.a
make
2010/12/26 <go.peter.90@gmail.com>
> For this package,
>
> gosqlite: trivial sqlite3 binding for Go
> http://code.google.com/p/gosqlite/
>
> compiling this program,
>
> package main
>
> import (
> "fmt"
> sqlite "gosqlite"
> )
>
> func main() {
> db, err := sqlite.Open("gosqlite.db")
> fmt.Println(db, err)
> }
>
> fails when linking,
>
> $ 8l gosqlite.8
>
> adddynlib: unsupported binary format
>
> adddynlib: unsupported binary format
>
> p:/cgo/pkg/windows_386/gosqlite.a(sqlite.cgo2.o): elf object but not 386
>
> p:/cgo/pkg/windows_386/gosqlite.a(_cgo_export.o): elf object but not 386
>
> gosqlite._Cfunc_sqlite3_column_count:
> _cgo_a211002cfcb2_Cfunc_sqlite3_column_cou
>
> nt: not defined
>
> gosqlite._Cfunc_my_bind_text: _cgo_a211002cfcb2_Cfunc_my_bind_text: not
> defined
>
> gosqlite._Cfunc_sqlite3_bind_parameter_count:
> _cgo_a211002cfcb2_Cfunc_sqlite3_bi
>
> nd_parameter_count: not defined
>
> gosqlite._Cfunc_sqlite3_step: _cgo_a211002cfcb2_Cfunc_sqlite3_step: not
> defined
>
> gosqlite._Cfunc_sqlite3_column_bytes:
> _cgo_a211002cfcb2_Cfunc_sqlite3_column_byt
>
> es: not defined
>
> gosqlite._Cfunc_my_bind_blob: _cgo_a211002cfcb2_Cfunc_my_bind_blob: not
> defined
>
> gosqlite._Cfunc_sqlite3_errmsg: _cgo_a211002cfcb2_Cfunc_sqlite3_errmsg:
> not defi
>
> ned
>
> gosqlite._Cfunc_sqlite3_reset: _cgo_a211002cfcb2_Cfunc_sqlite3_reset:
> not define
>
> d
>
> gosqlite._Cfunc_sqlite3_close: _cgo_a211002cfcb2_Cfunc_sqlite3_close:
> not define
>
> d
>
> gosqlite._Cfunc_sqlite3_column_blob:
> _cgo_a211002cfcb2_Cfunc_sqlite3_column_blob
>
> : not defined
>
> gosqlite._Cfunc_sqlite3_open_v2:
> _cgo_a211002cfcb2_Cfunc_sqlite3_open_v2: not de
>
> fined
>
> gosqlite._Cfunc_sqlite3_finalize:
> _cgo_a211002cfcb2_Cfunc_sqlite3_finalize: not
>
> defined
>
> gosqlite._Cfunc_free: _cgo_a211002cfcb2_Cfunc_free: not defined
>
> gosqlite._Cfunc_sqlite3_prepare_v2:
> _cgo_a211002cfcb2_Cfunc_sqlite3_prepare_v2:
>
> not defined
>
> gosqlite._Cfunc_sqlite3_threadsafe:
> _cgo_a211002cfcb2_Cfunc_sqlite3_threadsafe:
>
> not defined
>
> .windynamic: _cgo_a211002cfcb2_Cfunc_sqlite3_errmsg(0): not defined
>
> .windynamic: _cgo_a211002cfcb2_Cfunc_sqlite3_reset(0): not defined
>
> too many errors
>
>
> http://codereview.appspot.com/3733046/
>
looks good; one nit to make it work on non-windows http://codereview.appspot.com/3733046/diff/34001/src/pkg/runtime/windows/386/rt0.s File src/pkg/runtime/windows/386/rt0.s (right): http://codereview.appspot.com/3733046/diff/34001/src/pkg/runtime/windows/386/rt0.s#newcode8 ...
14 years, 2 months ago
(2011-01-20 13:30:37 UTC)
#10
On 2011/01/20 14:20:56, rsc wrote: > looks good but please hg sync and hg mail. ...
14 years, 2 months ago
(2011-01-20 14:36:50 UTC)
#13
On 2011/01/20 14:20:56, rsc wrote:
> looks good but please hg sync and hg mail.
> doesn't apply cleanly with your most recent 6l changes.
Done hg sync and hg mail, please take another look.
Thanks for review.
Issue 3733046: code review 3733046: new cgo windows port.
(Closed)
Created 14 years, 3 months ago by vcc
Modified 14 years, 2 months ago
Reviewers:
Base URL:
Comments: 25