Title: C2064 Error when building simple_dae on Windows · dae-cpp/dae-cpp · Discussion #57 · GitHub
Open Graph Title: C2064 Error when building simple_dae on Windows · dae-cpp/dae-cpp · Discussion #57
X Title: C2064 Error when building simple_dae on Windows · dae-cpp/dae-cpp · Discussion #57
Description: C2064 Error when building simple_dae on Windows
Open Graph Description: 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...
X Description: 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 t...
Opengraph URL: https://github.com/dae-cpp/dae-cpp/discussions/57
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"QAPage","mainEntity":{"@type":"Question","name":"C2064 Error when building simple_dae on Windows","text":"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.
","upvoteCount":1,"answerCount":2,"acceptedAnswer":{"@type":"Answer","text":"I couldn't reproduce this error (tried with Visual Studio 2022), it compiled just fine.
\nThe 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):
\njac(J, xk, state.t);\nHere jac is the Jacobian class functor, which is defined in the example source file (simple_dae.cpp), lines 101-107:
\nvoid operator()(sparse_matrix &J, const state_vector &x, const double t)\n{\n ...\n}
\nSo it does have 3 parameters.
\nJust a few questions so I could reproduce the issue:
\n\n- Did you modify anything in the example source code or in the solver source code, and if yes, what are the changes?
\n- Is it the latest
dae-cpp version from the master branch? \n- What version of Visual Studio do you use?
\n
\nThanks!
","upvoteCount":1,"url":"https://github.com/dae-cpp/dae-cpp/discussions/57#discussioncomment-13767369"}}}
| route-pattern | /_view_fragments/Voltron::DiscussionsFragmentsController/show/:user_id/:repository/:discussion_number/discussion_layout(.:format) |
| route-controller | voltron_discussions_fragments |
| route-action | discussion_layout |
| fetch-nonce | v2:b20899d8-9752-0710-b723-665ae6cdeafe |
| current-catalog-service-hash | 9f0abe34da433c9b6db74bffa2466494a717b579a96b30a5d252e5090baea7be |
| request-id | E912:ADAB8:1BBD0EA:24CE785:698D8079 |
| html-safe-nonce | ca7ab69d761c8944d9939172c08acb8409b394d036d098cecf94d1dc927fdee3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFOTEyOkFEQUI4OjFCQkQwRUE6MjRDRTc4NTo2OThEODA3OSIsInZpc2l0b3JfaWQiOiI1OTk0OTEwOTg4NTk4OTY5NTMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 85adf33f61e287be86db4db63f7092ddd97a7c0a1aa42ce41ca0c31cb144e06e |
| hovercard-subject-tag | discussion:8584431 |
| github-keyboard-shortcuts | repository,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/Voltron::DiscussionsFragmentsController/show/dae-cpp/dae-cpp/57/discussion_layout |
| twitter:image | https://opengraph.githubassets.com/f5ccc33245506e531df3b06065c3ba57ac801f307706f20612295cf34152f87a/dae-cpp/dae-cpp/discussions/57 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f5ccc33245506e531df3b06065c3ba57ac801f307706f20612295cf34152f87a/dae-cpp/dae-cpp/discussions/57 |
| og:image:alt | 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... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | c0818105fa276287e9369cfdefa0a0fa7953719791ceff9b94d69623c0a4fe8a |
| turbo-cache-control | no-preview |
| go-import | github.com/dae-cpp/dae-cpp git https://github.com/dae-cpp/dae-cpp.git |
| octolytics-dimension-user_id | 166443251 |
| octolytics-dimension-user_login | dae-cpp |
| octolytics-dimension-repository_id | 182800779 |
| octolytics-dimension-repository_nwo | dae-cpp/dae-cpp |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 182800779 |
| octolytics-dimension-repository_network_root_nwo | dae-cpp/dae-cpp |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 715890fa442134f528fb422ab338c0ad55c7a025 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width