https://github.com/andersy005/interactive-cpp
interacive c++ notebooks
https://github.com/andersy005/interactive-cpp
cpp
Last synced: 16 days ago
JSON representation
interacive c++ notebooks
- Host: GitHub
- URL: https://github.com/andersy005/interactive-cpp
- Owner: andersy005
- License: mit
- Created: 2016-03-30T05:23:42.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2018-01-25T22:28:36.000Z (over 8 years ago)
- Last Synced: 2025-03-28T23:37:49.145Z (about 1 year ago)
- Topics: cpp
- Language: Jupyter Notebook
- Homepage:
- Size: 52.7 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Play interactively with C++ Programming in [xeus-cling](https://github.com/QuantStack/xeus-cling)-a Jupyter Kernel for C++ based on xeus and cling
Note: Credit goes to [Uwe for his excellent blog post on how to setup C++ environment for Apache Arrow](https://uwekorn.com/2017/12/17/play-interactively-with-arrow-cpp-in-xeus-cling.html)
## Getting Started
As a start, we create a conda environment with all non-C++ dependencies and also install Jupyter Lab from conda-forge.
```bash
# Create a new conda environment
conda create -n xeus python=3.6 numpy six setuptools cython pandas \
pytest cmake rapidjson snappy zlib brotli jemalloc lz4-c zstd ninja \
jupyterlab -c conda-forge
source activate xeus
```
As the next step, we will install the gcc-6 compiler from QuantStack which we will use. Additionally, we install the boost-cpp build from QuantStack that was already built with gcc-6. We also set the environment variables CC and CXX so that the new compiler is picked up automatically by the build tools.
```bash
conda install gcc-6 boost-cpp -c QuantStack
export CC=${CONDA_PREFIX}/bin/gcc
export CXX=${CONDA_PREFIX}/bin/g++
```
As the last of the external dependencies, we install the actual interactive environment. For the C++ support, we install the interactive C++ compiler cling and the C++ kernel for Jupyter Notebook xeus-cling from the QuantStack channel.
```bash
conda install cling -c QuantStack -c conda-forge
conda install xeus-cling -c QuantStack -c conda-forge
```
After starting Jupyter Lab with jupyter lab, you should now see two additional kernels: xeus C++11 and xeus C++14. You can use either of them to use write interactive C++ programs.
