Skip to content

Commit

Permalink
Add Go bindings for snowboy with swigcxx
Browse files Browse the repository at this point in the history
  • Loading branch information
brentnd authored and Brent Dimmig committed Feb 27, 2017
1 parent fc9265f commit 73c722c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
9 changes: 9 additions & 0 deletions swig/Go/snowboy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package snowboydetect

/*
#cgo CXXFLAGS: -std=c++11
#cgo linux,amd64 LDFLAGS: -lcblas -L${SRCDIR}/../../lib/ubuntu64 -lsnowboy-detect
#cgo linux,arm LDFLAGS: -lcblas -L${SRCDIR}/../../lib/rpi -lsnowboy-detect
#cgo darwin LDFLAGS: -lcblas -L${SRCDIR}/../../lib/osx -lsnowboy-detect
*/
import "C"
13 changes: 13 additions & 0 deletions swig/Go/snowboydetect.swigcxx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// swig/Go/snowboydetect.swigcxx

%module snowboydetect

// Suppress SWIG warnings.
#pragma SWIG nowarn=SWIGWARN_PARSE_NESTED_CLASS
%include "std_string.i"

%{
#include "../../include/snowboy-detect.h"
%}

%include "../../include/snowboy-detect.h"

0 comments on commit 73c722c

Please sign in to comment.