We will explain in the following order:

  1. Programming languages that cannot install libraries

  2. How to install libraries generally

  3. How to install libraries for Go

1. Programming languages that cannot install libraries

The following programming languages cannot install 3rd party libraries (for now):

  • C

  • C++

  • C

2. How to install libraries generally

Note ☝️
You cannot add libraries from running a command!
(For example, running
npm install will not work for JavaScript.)
So in this article, we will explain how to add them manually.

Click the hamburger menu button.

Open the file that manages libraries from the folder list.

Note ☝️
In this example we are using JavaScript, so the file in question is package.json.
For other languages, the file names are listed below:

  • Java - pom.xml

  • PHP - composer.json

  • Python - requirements.txt

  • Python3 - requirements.txt

  • Scala - build.sbt

  • Perl - cpanfile

  • Ruby - Gemfile

  • Swift - Package.swift

  • Kotlin - build.gradle

Add the library you would like to use.

Note ☝️
In this example, we will add the popular library lodash.

Note ☝️
Please look up how to manually specify libraries (it is different in every programming language)

Click "Run" to install the library.

You can see the result on the console.

Note☝️
Any errors would appear here if something went wrong.

3. How to install libraries for Go

(The way to install libraries for Go is a bit different from other languages.)
Click the hamburger menu button.

Open the build.sh file from the folder list.

Before where it says: go build...

...add the following code...

go get {file path}


Note☝️
In this example, we are installing EasyMIDI from GitHub, so the { file path } is:

github.com/algoGuy/EasyMIDI/smfio

Click "Run" to install the library.

You can see on the console that the build.sh ran successfully.

Note☝️
Any errors would appear here if something went wrong.

Note☝️
You can add more libraries by adding multiple lines with different file paths.

That's it! Good luck :)


回答が見つかりましたか?