-
|
I was able to compile and run the simple_dae example on Lilnux, but when I try on my Windows machine with MSVS I get the following compiler error: C2064 "term does not evaluate to a function taking 2 arguments". The error is in line 500 of solver.hpp, related to the Jacobian passed to the solver. I'm relatively new to c++so I may be missing something obvious. Thank you for your help. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
|
I couldn't reproduce this error (tried with Visual Studio 2022), it compiled just fine. The error message you posted is a bit strange. So the compiler expected a function that takes 2 arguments for some reason, but we call it providing 3 (line 500): jac(J, xk, state.t);Here void operator()(sparse_matrix &J, const state_vector &x, const double t)
{
...
}So it does have 3 parameters. Just a few questions so I could reproduce the issue:
Thanks! |
Beta Was this translation helpful? Give feedback.
-
|
Glad that it worked! Yeah I heavily use so-called functors (when you overload the |
Beta Was this translation helpful? Give feedback.
I couldn't reproduce this error (tried with Visual Studio 2022), it compiled just fine.
The error message you posted is a bit strange. So the compiler expected a function that takes 2 arguments for some reason, but we call it providing 3 (line 500):
jac(J, xk, state.t);Here
jacis the Jacobian class functor, which is defined in the example source file (simple_dae.cpp), lines 101-107:So it does have 3 parameters.
Just a few questions so I could reproduce the issue:
dae-cppβ¦