-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Description
The following works on Mac OS X, but not on Linux. (The obvious bits below, declarations of m
and such, are ommited.)
// common.h
struct A {};
// a.cpp
#include "common.h"
PYBIND11_PLUGIN(a)
{
py::class_<A>(m, "A")
.def(py::init<>());
}
// b.cpp
#include "common.h"
PYBIND11_PLUGIN(b)
{
m.def("test", [](A a) { fmt::print("test\n"); });
}
# test.py
import a
import b
x = a.A()
b.test(x)
On Mac, this works fine. On Linux, I get:
TypeError: Incompatible function arguments. The following argument types are supported:
1. (A) -> None
Metadata
Metadata
Assignees
Labels
No labels