-
Notifications
You must be signed in to change notification settings - Fork 311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Moco] Failed to compile and my solution #3008
Comments
Hi @sjtulzh, thanks for raising this issue. I wonder if you could wrap the inputs to the emplace_back call with brackets to get it to work for your build process:
But creating the intermediate variable seems fine and should work across platforms and environments. If you'd like, you could create a PR to implement this change and I could review it. Otherwise, I'll leave this issue up until one of us makes the change internally. |
Hi, I have the same problem just like yours, but besides, I encounter other more problems, too. |
hi I have tried this solution, But it did not work. |
Hi @yaujunking, I responded to you on the forum. |
When I use gcc-5.4 & g++-5.4 & cmake-3.20 to build opensim-core from source on Ubuntu 16.04, some errors occur. First, I prebuild the dependencies successfully. But errors occur when compile opensim-core.
The error is that:
At first I think it is the problem of gcc and g++ version, I change to 4.9 as the guideline suggests, but it doesn't work. I look for the source code and find this:
m_implicit_component_refs is defined as:
m_implicit_component_refs is a vector and its elements are std::pair.
So I modify the code like that:
I use a tmp_pair variant to pass the value.
Besides this file, MocoFrameDistanceConstraint.cpp has a similar problem in line 72
I am not sure using "emplace" directly without "make_pair" to get a std::pair is correct or not on other platform or environment. But I can solve the compile errors after modifying the code like above.
If other people face the similar errors, you can try this solution.
The text was updated successfully, but these errors were encountered: