github.com/cellofellow/gopkg@v0.0.0-20140722061823-eec0544a62ad/database/leveldb.chai2010/leveldb_windows.cc (about) 1 // Copyright 2013 <chaishushan{AT}gmail.com>. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 // mingw can't use these ldflags: 6 // -static-libgcc -static-libstdc++ (or -static) 7 // https://code.google.com/p/go/issues/detail?id=6733 8 // https://code.google.com/p/go/issues/detail?id=6533 9 10 //#include "capi/leveldb_c.cc" 11 //#include "capi/leveldb_all.cc" 12 13 // Build with dll on windows: 14 // 0. #cgo windows LDFLAGS: -L./capi -lleveldb_c 15 // 1. install MinGW/MSVC/CMake 16 // 2. build leveldb_c.dll/libleveldb_c.a with build_msvc.bat 17 // 3. go run hello.go