diff --git a/src/optimization/CasADiOpti.cpp b/src/optimization/CasADiOpti.cpp index 367d1947..822534c2 100644 --- a/src/optimization/CasADiOpti.cpp +++ b/src/optimization/CasADiOpti.cpp @@ -29,7 +29,7 @@ void CasADiOpti::Solve() { // I don't try-catch this next line since it should always work. // I'm assuming the dynamic lib is on the path and casadi can find it. auto pluginOptions = casadi::Dict(); - pluginOptions["iteration_callback"] = &callback; + pluginOptions["iteration_callback"] = *callback; //auto reference = &pluginOptions["iteration_callback"]; opti.solver("ipopt", pluginOptions); #else