i want use leveldb in go,and find levigo tool try build follow command
go github.com/jmhodges/levigo
then got failed error:
/home/fun/workspace/study/leveldb/test/libleveldb.a(env_posix.o): in function `leveldb::(anonymous namespace)::startthreadwrapper(void*)': env_posix.cc:(.text+0x1e): undefined reference `operator delete(void*)' /home/fun/workspace/study/leveldb/test/libleveldb.a(env_posix.o): in function `leveldb::(anonymous namespace)::posixenv::newlogger(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, leveldb::logger**)': env_posix.cc:(.text+0x10c): undefined reference `operator new(unsigned long)' /home/fun/workspace/study/leveldb/test/libleveldb.a(env_posix.o): in function `leveldb::(anonymous namespace)::posixenv::newsequentialfile(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, leveldb::sequentialfile**)': env_posix.cc:(.text+0x1e1): undefined reference `operator new(unsigned long)' env_posix.cc:(.text+0x1f7): undefined reference `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
then try run :
cgo_cflags="-i/path/to/leveldb/include" cgo_ldflags="-l/path/to/leveldb/lib" go github.com/jmhodges/levigo
it not work , report same error . know happened , how fix it? thank you.
here's installation of levigo:
$ uname -a linux peter 3.8.0-27-generic #40-ubuntu smp tue jul 9 00:17:05 utc 2013 x86_64 x86_64 x86_64 gnu/linux $ go version go version devel +037a28ab0725 thu aug 22 12:13:54 2013 +0900 linux/amd64 $ sudo apt-get install libleveldb-dev reading package lists... done building dependency tree reading state information... done libleveldb-dev newest version. 0 upgraded, 0 newly installed, 0 remove , 0 not upgraded. $ go -v github.com/jmhodges/levigo github.com/jmhodges/levigo (download) github.com/jmhodges/levigo $
what output if run these commands?