Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save looopTools/359b794a49ddec301f6c to your computer and use it in GitHub Desktop.
Save looopTools/359b794a49ddec301f6c to your computer and use it in GitHub Desktop.
[tools@steinwurf-124 kodogo]$ ./compile
go build: when using gccgo toolchain, please pass linker flags using -gccgoflags, not -ldflags
# command-line-arguments
could not determine kind of name for C.kodo
/*
#cgo LDFLAGS: -Llibkodoc.so
#include "kodoc.h"
*/
import "C"
import "unsafe"
type Factory C.kodo_factory_t
type Coder C.kodo_coder_t
//------------------------------------------------------------------
// Factory API
//------------------------------------------------------------------
func deleteFactory(factory Factory) {
C.kodo_delete_factory(factory)
}
func newEncoderFactory(code_type int32, finite_field int32,
max_symbols uint32, max_symbol_size uint32) Factory {
return C.kodo_new_encoder_factory(code_type, finite_field,
max_symbols, max_symbol_size)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment