nameclash on Windows for .pdb files
When building with MSVC the .pdb file for the .dll (which is needed for the debugger) is overwritten by the .pbd file for the executable. This happens because both are named highs.pdb. When I put an "if(NOT MSVC)" clause around this line we generate a libhighs.pdb, so the issue is resolved.
Perhaps a better fix would be to check whether the system is not Windows for the same clause, or rename the executable instead.
Hi @lkapelevich, I see where you have added the fix.
Would you please try to use the CMake flag FAST_BUILD=ON when you are building and let me know if you still get issues? The flag will be on by default very soon and updates the CMake build.
Hi @galabovaa. That works, no issues.
I still think it's strange that the shared library and executable get a .pdb with the same name. FWIW, I just found this flag https://cmake.org/cmake/help/latest/prop_tgt/PDB_NAME.html, and PDB_NAME libhighs in the same clause also works for me.
Has this issue been resolved? @lkapelevich @galabovaa
I think adding PDB_NAME would resolve this fully.
An analogous issue/fix in another repo: https://github.com/eclipse/mosquitto/issues/2714
Thanks again Lea, I have just finished the big cmake refactoring we needed for python and looked at this again. I've added the fix to FAST_BUILD OFF for legacy code and will merge it in latest. Note, that we may remove the FAST_BUILD OFF option all together at some point, so users are strongly encouraged to use the default FAST_BUILD=ON and let us know if there are any issues with that!
That's great. Is there a reason not to add the flag for FAST_BUILD ON, so that it can stay when FAST_BUILD OFF disappears?
Yes, it is best not to add it at all! Removing it won't happen for another few months, but still, since FAST_BUILD=ON is default now, you don't need it. It was needed just before we made it default, as we were adding features and bug fixes to the "more modern cmake" and we didn't change much in FAST_BUILD OFF to avoid breaking what people were using at the time as we upgraded.