Is linking a project with a library that is built with different version of tool set compatible. When I tried this between VS2015/2013, the C++ linker complained MSVC_version are different.
error LNK2038: mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800'
-
Am I doing something wrong or is this the expected behavior?
-
If this is expected, since compilers generate the platform specific code, why is this not allowed?An example contrary I came up with is, if C++11 changed int definition to be 64 bit wide vs C++03 complaint old compiler just 32 bits.But it still seems that with smart compiler/linker options this can be allowed?
Finally, I stumbled on this while I am trying to use a open source library that uses C++11 features quite a bit. But a lot of my projects existing code is in 2013. Is there anyway to use the library features with out complete upgrade of my project? I am sure I am missing something as a lot of libs should work independently like api libraries using old drivers install in old windows machines etc., What am I missing?
-Thank you.
Aucun commentaire:
Enregistrer un commentaire