Skip to content

Instantly share code, notes, and snippets.

@Shikugawa
Shikugawa / go_cpp_swig_linkage.md
Created January 26, 2020 17:54
Call C++ Library from Go using shared library with SWIG

Introduction

SWIG can generate interface for other languages to call C++ functions. If C++ codes are separeted to mutiple directories, we may have some trouble.

Build Flow

  1. Prepare directories like this.
- invoke
 - invoke.cpp
@milessabin
milessabin / shapeless-session.txt
Created April 1, 2016 12:29
shapeless on the Ammonite REPL with no dependencies other than an installed JDK. Many thanks to @przemekpokrywka for the idea, @alxarchambault for Coursier and @li_haoyi for Ammonite.
miles@frege:~$ ./shapeless.sh
Loading...
Welcome to the Ammonite Repl 0.5.2
(Scala 2.11.7 Java 1.8.0_51)
@ val l = 23 :: "foo" :: true :: HNil
l: Int :: String :: Boolean :: HNil = ::(23, ::("foo", ::(true, HNil)))
@