This commit is contained in:
2025-07-28 09:16:46 +08:00
parent 15764c8052
commit e5f835f5de
6 changed files with 50 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
#include <pybind11/pybind11.h>
int add(int a, int b) {
return a + b;
}
PYBIND11_MODULE(example, m) {
m.def("add", &add, "A function that adds two numbers");
m.def("hello", []() {
return "Hello from C++!";
});
}