You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For using matplotlibcpp17 from CMakeLists.txt, see [hello_world](https://github.com/soblin/matplotlibcpp17/tree/master/hello_world) example.
31
+
32
+
Or you could just add include path to `include` directory and compile your codes as descibed in [minimal example](#minimal-example).
22
33
23
34
## Syntax
24
35
@@ -31,7 +42,7 @@ The user will need to capsulate *arguments* in `Args(arg1, arg2, ...) == pybind1
31
42
### minimal example
32
43
33
44
```cpp
34
-
g++ hello_world.cpp -std=c++17 -I./include -I/usr/include/python3.x -I<path to pybind11> -lpython3.x
45
+
g++ ./hello_world/hello_world.cpp -std=c++17 -I./include -I/usr/include/python3.x -I<path to pybind11> -lpython3.x
35
46
./a.out
36
47
```
37
48
@@ -148,13 +159,17 @@ From [gallery/artist_animation/random_walk.cpp](https://github.com/soblin/matplo
148
159
149
160
### build
150
161
162
+
If you do not need to build the demos, use `-DADD_DEMO=0` (by default it is `1`).
163
+
151
164
```bash
152
-
mkdir build; cd build; cmake .. ; make -j
165
+
$ mkdir build; cd build
166
+
$ cmake .. -DADD_DEMO={0, 1} -DUSE_GUI={0, 1}
167
+
$ make -j
153
168
```
154
169
155
-
If you want to see the demo with `plt.show()`, add`-DUSE_GUI=1` (by default it is `0`). Otherwise the executables will `plt.savefig()` to `gallery/images` directory.
170
+
If you do not need to see the demo with `plt.show()`, use`-DUSE_GUI=0` (by default it is `1`). Otherwise the executables will `plt.savefig()` to `gallery/images` directory.
156
171
157
-
`make <gallery directory name>` runs all executables under that directory.
172
+
`make <gallery directory name>` runs all the executables under that directory.
0 commit comments