-
Notifications
You must be signed in to change notification settings - Fork 289
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
IpCalculatedQuantities compile errors on MSVC #572
Comments
It looks to me like the forward declaration of |
Including "IpMatrix.hpp" and "IpSymMatrix.hpp" before the include for "IpIpoptCalculatedQuantities.hpp" seems to have solved my compile problem at the expense of a whole lot more warnings, but that's to be expected. I guess my question more narrowly is why does this show up on the MSVC build pipeline, and not on the gcc ones? We're using the precompiled dlls for our MSVC work rather than compiling from source so that's my best guess at the difference. Why do I have to do these two extra includes for this toolchain, and not for the others? |
The stub header was a copy and paste of the IpIpoptCalculatedQuantities.hpp header that I just pruned back to give a fake implementation of the methods we were using. Core development is on linux so the feature was just going to be unsupported on the MSVC branch. |
I would guess that GCC was ok with |
Since I've got a workaround I think this can be closed. I'll leave that to your discretion if there are any changes needed within ipopt to support MSVC builds. |
We've started making use of the 'IpCalculatedQuantities*' object via the Ipopt::TNLP::intermediate_callback(...) method on my team, and we run into issues when compiling on Visual Studio. On our Msys2 and linux/gcc CI pipelines everything works, but the MSVC pipeline fails and gives
\thirdparty\Ipopt-3.14.5-win64-msvs2019-md\include\coin-or\IpSmartPtr.hpp(640,1): error C2027: use of undefined type 'Ipopt::Matrix'
as the error repeated 100s of times.I narrowed it down to the
#include "IpIpoptCalculatedQuantities.hpp"
file and made a stub header for our MSVC pipeline, but it would be nice if I could get away from that.The text was updated successfully, but these errors were encountered: