Install G++ Libraries Mac

Installing Additional Arduino Libraries

On this page... (hide)

Apr 02, 2020 Install, uninstall, and upgrade packages. PyCharm provides methods for installing, uninstalling, and upgrading Python packages for a particular Python interpreter. By default, PyCharm uses pip to manage project packages. For Conda environments you can use the conda package manager.

  • How to Install a Library

Once you are comfortable with the Arduino software and using thebuilt-in functions, you may want to extend the ability of your Arduinowith additional libraries.

What are Libraries?

Libraries are a collection of code that makes it easy for you to connect to a sensor, display, module, etc. For example, the built-in LiquidCrystal library makes it easy to talk to character LCD displays. There are hundreds of additional libraries available on the Internet for download. The built-in libraries and some of these additional librariesare listed in the reference. To use theadditional libraries, you will need to install them.

How to Install a Library

Using the Library Manager

To install a new library into your Arduino IDE you can use the Library Manager (available from IDE version 1.6.2).Open the IDE and click to the 'Sketch' menu and then Include Library > Manage Libraries.

Then the Library Manager will open and you will find a list of libraries that are already installed or ready for installation. In this example we will install the Bridge library. Scroll the list to find it, click on it, then select the version of the library you want to install. Sometimes only one version of the library is available. If the version selection menu does not appear, don't worry: it is normal.

Finally click on install and wait for the IDE to install the new library. Downloading may take time depending on your connection speed.Once it has finished, an Installed tag should appear next to the Bridge library. You can close the library manager.

You can now find the new library available in the Sketch > Include Library menu.If you want to add your own library to Library Manager, follow these instructions.

Importing a .zip Library

Libraries are often distributed as a ZIP file or folder. The name of the folder is the name of the library. Inside the folder will be a .cpp file, a .h file and often a keywords.txt file, examples folder, and other files required by the library. Starting with version 1.0.5, you can install 3rd party libraries in the IDE. Do not unzip the downloaded library, leave it as is.

In the Arduino IDE, navigate to Sketch > Include Library > Add .ZIP Library. At the top of the drop down list, select the option to 'Add .ZIP Library'.

You will be prompted to select the library you would like to add. Navigate to the .zip file's location and open it.

Return to the Sketch > Include Library menu. menu. You should now see the library at the bottom of the drop-down menu. It is ready to be used in your sketch.The zip file will have been expanded in the libraries folder in your Arduino sketches directory.

NB: the Library will be available to use in sketches, but with older IDE versions examples for the library will not be exposed in the File > Examples until after the IDE has restarted.

Manual installation

When you want to add a library manually, you need to download it as a ZIP file, expand it and put in the proper directory. The ZIP file contains all you need, including usage examples if the author has provided them. The library manager is designed to install this ZIP file automatically as explained in the former chapter, but there are cases where you may want to perform the installation process manually and put the library in the libraries folder of your sketchbook by yourself.
You can find or change the location of your sketchbook folder at File > Preferences > Sketchbook location.


Go to the directory where you have downloaded the ZIP file of the library


Extract the ZIP file with all its folder structure in a temporary folder, then select the main folder, that should have the library name


Copy it in the “libraries” folder inside your sketchbook.


Start the Arduino Software (IDE), go to Sketch > Include Library. Verify that the library you just added is available in the list.


Please note: Arduino libraries are managed in three different places: inside the IDE installation folder, inside the core folder and in the libraries folder inside your sketchbook. The way libraries are chosen during compilation is designed to allow the update of libraries present in the distribution. This means that placing a library in the “libraries” folder in your sketchbook overrides the other libraries versions.
The same happens for the libraries present in additional cores installations. It is also important to note that the version of the library you put in your sketchbook may be lower than the one in the distribution or core folders, nevertheless it will be the one used during compilation. When you select a specific core for your board, the libraries present in the core’s folder are used instead of the same libraries present in the IDE distribution folder.
Last, but not least important is the way the Arduino Software (IDE) upgrades itself: all the files in Programs/Arduino (or the folder where you installed the IDE) are deleted and a new folder is created with fresh content.
This is why we recommend that you only install libraries to the sketchbook folder so they are not deleted during the Arduino IDE update process.


This tutorial based on text by Limor Fried.
Last revision 2017/02/07 by SM


The text of the Arduino getting started guide is licensed under aCreative Commons Attribution-ShareAlike 3.0 License. Code samples in the guide are released into the public domain.

There are two ways to use the ALE suite of programs. The simplest approach is using Docker, the other is building it from source which uses cmake and requires installing several dependencies.

Using Docker

Install Docker

To use ALE using Docker, you need to install Docker first.

  • Under Mac OS X, this is done with a DMG file that can be downloaded from there.
  • Under Windows, you can download the executable file from there
  • Under Linux, you need to choose your particular flavor on the left of this page and then follow the instructions.

Test Docker

Once Docker has been installed, you can use ALE as follows. As described in README.md, you need to run ALEobserve then ALEml or ALEmcmc_undated to get reconciled gene trees, and this is explained below.

Let's assume you have a file named geneFamily.treelist containing a distribution of gene trees, and a species tree named species_tree.newick.We will launch the program from the folder containing those data, which means that we will launch the command from the folder $PWD. $PWD is the usual environmental variable that UNIX-type operating systems use to point to the Present Working Directory.If you want to use the example data to test the software, this means your $PWD will be /absolute_path/ALE/example_data, your species tree will be S.tree, and your gene tree file will be either HBG745965_real.1.treelist.txt or HBG745965_real.2.treelist.txt.

Install G Libraries Mac Os

The way the docker image is as follows: you can run all the programs of the ALE suite, and only have to precede the command you would use to launch them with docker run -v $PWD:$PWD -w $PWD boussau/alesuite .

For instance, we provide below what the typical pipeline would look like.

  • The first command to use is:
  • The second command to use could be:

or

for instance.

Those commands will produce the output files describing scenarios of gene family evolution including events of gene transfer, duplication and loss.

Building from source

Installation from source requires:

  • cmake
  • a C++ compiler (e.g. g++ or clang >=3.8.0)
  • the Bio++ libraries bpp-core, bpp-seq, and bpp-phyl
  • the Boost C++ libraries (serialization and mpi)

Installing dependencies

Basic dependencies

Ubuntu 16.10:

openSUSE 42.2:

CentOS 7:

On CentOS and Fedora based systems the MPI (e.g. OpenMPI, MPICH, etc.) libraries and binaries are not included in the $PATH environmental variable by default. You have to use the environment-modules package to load them manually.

First install the package:

Then logout from your current shell and login again or open a new shell.

Test that the module command is available and working:

This will output something like:

Mac OS X:At the time of this writing, the version of clang embarked in Mac OS X does not support OpenMP, so we suggest to install gcc. Assuming homebrew has been installed on the mac already:

Boost libraries

Ubuntu 16.10:

openSUSE 42.2:

Install G++ Libraries Macbook

CentOS 7:

Mac OS X:

  • download boost, a version between 1.55 and 1.63 (included): https://sourceforge.net/projects/boost/files/boost/
  • unarchive it
  • install it :

Bio++ libraries

Mac OS X:For Mac OS X, we recommend installing from source, making sure to compile with the gcc installed previously with brew, adding the following options to the cmake command lines below: -DCMAKE_CXX_COMPILER=/usr/local/Cellar/gcc/7.1.0/bin/g++-7

Building from source

First create a directory, where we can build the libraries.

Install G++ Libraries Mac

Then clone the git repositories:

Afterwards create the build directories:

Finally build and install the libraries.

The default installation locations are ${CMAKE_INSTALL_PREFIX}/include and ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}. $LIB_SUFFIX is empty by default.

To install locally (e.g. to your home directory) just replace the CMAKE_INSTALL_PREFIX switch with the desired path. In this case you don't need sudo rights to make install.

Don't forget to step back two directories.

Precompiled from repository

The precompiled libraries don't always work (see Troubleshooting), our recommendation is to build Bio++ from source.

Ubuntu 16.10:

openSUSE 42.2:

For openSUSE the Bio++ libraries are in a user's repository which needs to be added to Zypper:

After that you can install the needed Bio++ libraries:

Compiling ALE

Clone the git repository:

It's recommended to create a folder named build in the ALE folder:

On CentOS 7:Before executing cmake load the mpi module:

Failing to do so cmake will find neither any MPI library nor the boost_mpi library.

Remember that in case you're going to use ALE with MPI you have to execute the same command above beforehand.

Then run cmake:

Any other GNU/Linux:Then run cmake:

Using make with the option '-j 4' paralellizes compilation across 4 processes and speeds it up. Those commands will produce executable files in the folder ALE/build/bin.

Mac OS X:For Mac OS X, you need to make sure to compile with the gcc installed previously with brew, adding the following options to the cmake command line, i.e. :

Install G++ Libraries Mac Os

Troubleshooting

CMake doesn't find Boost libraries

Provided that the Boost libraries are installed, this error can mean that CMake just can't find any static Boost libraries.

Delete the contents of the build directory:

and try to build ALE with the BUILD_STATIC switch set to OFF:

undefined reference to Bio++ function(s)/variable(s)

The linkage is broken, if you use prebuilt Bio++ libraries you should delete (and purge) the packages and compile them from source.

If you have built Bio++ from source you could first try to set the paths explicitly:

In addition, you need to make sure that you are compiling ALE with the same compiler (e.g. same version of g++, or same version of clang) you used for compiling Bio++.

If this does not work and you have multiple Bio++ library instances installed you can try to remove every instance except one and then try to build ALE.

If it is still not working a fresh start usually helps: remove all Bio++ libraries and rebuild them, then try to build ALE.

Default C++ compiler does not support one of the required libraries

After installing a compiler which has support, you can tell cmake to use it:

Install G++ Libraries Macbook Pro

Could not find MPI_CXX

Install G++ Libraries Machine

If you get an error like:

Then you either don't have any MPI implementation (e.g. OpenMPI or MPICH) installed or if you're using Red Hat-based OS, then you may have forgot to load the MPI module with: