Updates README with setup/build/run instructions
This commit is contained in:
parent
d71f284625
commit
a804694726
39
README.md
39
README.md
|
|
@ -1 +1,38 @@
|
||||||
A basic C++ exercise.
|
A basic C++ exercise which uses `conan` to satisfy dependencies before building a shared library and
|
||||||
|
an executable that links it. Also produces a `.deb` package which installs the executable, library,
|
||||||
|
and public headers.
|
||||||
|
|
||||||
|
## Prerequisites
|
||||||
|
* Ubuntu 22.04 (or equivalent)
|
||||||
|
* Additional required packages:
|
||||||
|
* `g++`
|
||||||
|
* `cmake`
|
||||||
|
* `python3-venv`
|
||||||
|
|
||||||
|
## Setup
|
||||||
|
Create a `python` virtual environment, install `conan`, and create a default profile:
|
||||||
|
```bash
|
||||||
|
python3 -m venv conan.venv
|
||||||
|
source conan.venv/bin/activate
|
||||||
|
pip install conan
|
||||||
|
conan profile detect
|
||||||
|
```
|
||||||
|
|
||||||
|
## Building and running
|
||||||
|
1. To build, run:
|
||||||
|
```bash
|
||||||
|
./build.sh
|
||||||
|
```
|
||||||
|
2. The build command will generate a `deb` package in the `_packages` directory. To install (to
|
||||||
|
`/usr/local`) run:
|
||||||
|
```
|
||||||
|
sudo dpkg -i _packages/_packages/cppchallenge_1.0.0_*.deb
|
||||||
|
sudo ldconfig
|
||||||
|
```
|
||||||
|
__TODO__: The `sudo ldconfig` step should be added to the `deb` package `postinst` step...
|
||||||
|
3. To run:
|
||||||
|
```
|
||||||
|
$ cppchallenge
|
||||||
|
Hello World!
|
||||||
|
File name is: aname
|
||||||
|
```
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue