Skip to content

Setting up BearLibTerminal (Linux)

Jeremy Cerise edited this page Jan 31, 2020 · 3 revisions

In order to use Gogue, BearLibTerminal must be present and configured on your system. The choice to use BearLibTerminal (henceforth BLT) was made due to its wonderful set of functionality, and generally easy to use API.

  1. Download BLT for Linux here - Make sure to get the Linux distribution. Un-archive it somewhere.

  2. In your $GOPATH/src directory, create a new directory called bearlibterminal.

  3. From your BLT download, copy the Linux64/libBearLibTerminal.so file to /usr/local/lib (Note: this is a brute force approach to installing this library. There is probably a better way to do it. Caveat Emptor). Once copied, run ldconfig -n -v /usr/local/lib. This will install the library on your system.

  4. From your BLT download, copy the Includes/Go/BearLibTerminal.go file into $GOPATH/src/bearlibterminal.

  5. Also from the BLT download, copy Includes/C/BearLibTerminal.h file to your $GOPATH/src/bearlibterminal

  6. From a terminal, navigate to your $GOPATH/src/bearlibterminal directory, and run go mod init. This should create a go.mod file in your bearlibterminal directory, and with that, we are all set to use BearLibTerminal in our Gogue projects!

You can also run go build in your bearlibterminal project just to ensure everything is linked correctly. If theres no output from that command, you're good to go.

Clone this wiki locally