# Cloning and building example project
<!-- .slide: data-background="#ccc" -->
___
<!-- .slide: data-background="#ccc" --><!-- .slide: data-background="#ccc" -->

## Setup

* <!-- .element: class="fragment fade-in" --> Clone repository: https://github.com/nauka-programowania-MA/AdvancedCppV2
* <!-- .element: class="fragment fade-in" --> Go to exercises/exampleProject
* <!-- .element: class="fragment fade-in" --> Compile it and run:
    * <!-- .element: class="fragment fade-in" --> <code>mkdir build</code>
    * <!-- .element: class="fragment fade-in" --> <code>cd build</code>
    * <!-- .element: class="fragment fade-in" --> cmake ..
    * <!-- .element: class="fragment fade-in" --> make -j4 (where 4 is available threads)
    * <!-- .element: class="fragment fade-in" --> ./ExampleProject
* <!-- .element: class="fragment fade-in" --> Should print <code>Hello World</code>

If you don't have linux, you can use <a href="https://replit.com/">replit</a>
<!-- .element: class="fragment fade-in" -->
* <!-- .element: class="fragment fade-in" --> Click Create C++
* <!-- .element: class="fragment fade-in" --> Name it and confirm with button Create Repl.
* <!-- .element: class="fragment fade-in" --> Click three dot on the rigt top screen and click upload folder
* <!-- .element: class="fragment fade-in" --> Now find your directory with repo and upload it
* <!-- .element: class="fragment fade-in" --> Congratulation, you can use linux shell wit sanitizers, cmake and valgridn support :)
<!-- .element: class="fragment fade-in" -->

___
<!-- .slide: data-background="#ccc" --><!-- .slide: data-background="#ccc" -->

## replit

If you decided to use replit please configure this file: `replit.nix`:

```bash
{ pkgs }: {
	deps = [
		pkgs.clang_12
		pkgs.ccls
		pkgs.gdb
		pkgs.gnumake
		pkgs.vim
		pkgs.valgrind
		pkgs.cmake
	];
}
```