Skip to content

Commit 3409510

Browse files
committed
avoid the visibility mismatch with the scripter guard
1 parent 4fcf1ba commit 3409510

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

scripter-class-in-class/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
cmake_minimum_required(VERSION 3.4)
22
project(scripting VERSION 1.0 LANGUAGES CXX)
3+
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
34

45
set(PYBIND11_PYTHON_VERSION 3.4)
56

scripter-class-in-class/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,11 @@ $ cmake -Dpybind11_DIR=/home/ale/bin/pybind11/share/cmake/pybind11 ..
88
$ make
99
$ ./scripting
1010
~~~
11+
12+
# Notes
13+
14+
Pybind11 tries to set the visibilty for all symbols as hidden. In the `CMakeLists.txt` We need to set
15+
16+
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
17+
18+
because of the guard in the `script.h` file

0 commit comments

Comments
 (0)