Skip to content

Commit

Permalink
Make sure to link libstdc++ (#43)
Browse files Browse the repository at this point in the history
Seems to be necessary when linking in a static MinGW build of LevelDB.

I tried adding this anywhere to `CGO_LDFLAGS`, but that environment
variable always ends up at the beginning of the link options. And for
some reason, gcc expects `lstdc++` to come at least after `-lleveldb`,
and otherwise just ignores it without any indication.
That leaves this source change as the only option.
  • Loading branch information
nmlgc authored and jmhodges committed Oct 19, 2019
1 parent b54be59 commit 4f85f57
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion batch.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package levigo

// #cgo LDFLAGS: -lleveldb
// #cgo LDFLAGS: -lleveldb -lstdc++
// #include "leveldb/c.h"
import "C"

Expand Down

0 comments on commit 4f85f57

Please sign in to comment.