Mentions légales du service

Skip to content
Snippets Groups Projects

Update readme to add documentation VSCode

All threads resolved!
+ 34
4
## About this tutorial
Table of Contents
=================
- [About this tutorial](#about-this-tutorial)
- [Goal of this tutorial](#goal-of-this-tutorial)
- [How to run it?](#how-to-run-it-)
- [Additional references](#additional-references)
# About this tutorial
This tutorial is heavily inspired from a C++ tutorial created by David Chamont (CNRS) that was given as a lecture with the help of Vincent Rouvreau (Inria) in 2016; latest version of this tutorial used as the basis of current one may be found [there](https://gitlab.inria.fr/FormationCpp/DebuterEnCpp).
@@ -12,7 +20,7 @@ I have rewritten entirely and modified heavily several chapters, but the backbon
As the original tutorial, the present lecture is released under the [Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)](http://creativecommons.org/licenses/by-nc-sa/4.0/) licence.
## Goal of this tutorial
# Goal of this tutorial
This is an introductory lecture to the modern way of programming C++; at the end of it you should:
@@ -22,7 +30,7 @@ This is an introductory lecture to the modern way of programming C++; at the end
* Be aware of many good programming practices in C++.
## How to run it?
# How to run it?
As this tutorial relies heavily on [Xeus-cling kernel](https://github.com/QuantStack/xeus-cling), the only requirement is to install this environment on your machine.
@@ -30,7 +38,7 @@ Unfortunately, the support of this kernel is still experimental on Windows; I ad
Should the procedure described below not work at some point I invite you to check the link above, but at the time of this writing you need to:
* Install [miniconda3](https://conda.io/miniconda.html) environment (apparently using full-fledged anaconda may lead to conflict in dependancies).
* Install [miniconda3](https://conda.io/miniconda.html) environment (apparently using full-fledged anaconda may lead to conflict in dependencies).
* Create a new conda environment and activate it:
```
@@ -38,6 +46,19 @@ conda env create -f environment.yml
conda activate formation_cpp_2020
```
You can also do it [manually](https://xeus-cling.readthedocs.io/en/latest/installation.html#installing-the-kernel-spec) as:
```
conda create -n formation_cpp_2020 # Create a conda environment
source activate formation_cpp_2020 # Activate the environment you just created
conda install -c conda-forge xeus-cling # Install xeus-cling using conda
jupyter kernelspec install CONDA_LOCATION/envs/formation_cpp_2020/share/jupyter/xcpp11 --user # Register the C++ kernels
jupyter kernelspec install CONDA_LOCATION/envs/formation_cpp_2020/share/jupyter/xcpp14 --user
jupyter kernelspec install CONDA_LOCATION/envs/formation_cpp_2020/share/jupyter/xcpp17 --user
```
In order to consider additional libraries to the default ones, it is possible following the instructions from [here](https://krshrimali.github.io/Setting-Up-Xeus-Cling-Libtorch-OpenCV/).
* Then you can run the notebook by going **into its root directory** (or internal links won't work...) in a terminal and typing:
```
@@ -46,3 +67,12 @@ jupyter notebook
__BEWARE__: I **strongly advise** to use a dedicated environment for the notebook: the ultimate goal is to use a real C++ environment for your project, and the anaconda environment hides the native C++ compiler on your machine.
__NOTE__: It is possible to use the notebooks directly from IDEs like [VSCode](https://gitlab.inria.fr/formations/cpp/gettingstartedwithmoderncpp/-/wikis/home#using-notebooks-with-vscode).
# Additional references
You can find additional references in the project [wiki](https://gitlab.inria.fr/formations/cpp/gettingstartedwithmoderncpp/-/wikis/home).
Loading