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
MODEL_NAME is passed by -D in cmake, code like this:
// PYBIND11_MODULE(mpt, m) { // writing mpt directly is correctPYBIND11_MODULE(MODEL_NAME, m) {
m.doc() = "model python binding";
py::class_<Model>(m, "Model")
.def(py::init());
}
When I compile cmake DMODEL_ NAME=mpt, I got the following error:
error: pasting "pybind11_init_" and ""mpt"" does not give a valid preprocessing token
124 | PYBIND11_MODULE(MODEL_NAME, m) {
| ^~~~~~~~~~~~~~~
<command-line>: error: expected initializer before string constant
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
MODEL_NAME is passed by -D in cmake, code like this:
When I compile cmake DMODEL_ NAME=mpt, I got the following error:
May I ask if there is a solution?
Thank you very much for your outstanding work.
Beta Was this translation helpful? Give feedback.
All reactions