1

There is a library (.lib, we don't have the source code) which we use to communicate with a hardware device which was compiled using

_MSC_VER 1600

I wish to use a newer c++ standard while using this library. When I change it to the next higher available in VS studio I get the message that 1600 does not match 1900. Is there a way to use a newer c++ standard and continue the use of the old library?

The company which provided the files hasn't updated the drivers in years.

I found on SE various answers to this topic but most are on expert level on c++ compilation/linking. I had problems to understand them.

EDIT: It is not a DLL but a .lib file. This may be explain wy I could not understand this question and answer. Another similar answer is this one: C++ MSC_VER mismatch with Third Party library . Does this mean that the answer is "No, it is not possible. You have to use an old compiler version?"

Benedikt S. Vogler
  • 554
  • 1
  • 5
  • 19
  • 3
    If you saw other answers on this topic, but didn't understand them, you need to tell us precisely which parts you didn't understand, otherwise we are simply doomed to repeat the same information, helping nobody. – Lightness Races in Orbit Mar 06 '18 at 15:08
  • 1
    A few versions of the Visual Studio compiler are binary compatible, but in general you have to compile everything with the *exact same* compiler, which means recompiling your library or using the version of VS that the library was compiled with. – Jesper Juhl Mar 06 '18 at 15:13
  • 1
    The question does not make much sense, this check is only performed on static libraries. The kind where having a match between the #includes that were used to compile the code and the runtime version you link with is really, really important. For a DLL you only link the import library, no such check. So you are probably doing something wrong, ensure you link the correct .lib file. It is small. If this DLL was built with C++ code then you always want to consult the author if this is safe. Also the guy who can tell you how to solve this problem. – Hans Passant Mar 06 '18 at 15:15
  • I looked at the problem again and @HansPassant is right. The problem is with a statically linked library. – Benedikt S. Vogler Mar 06 '18 at 16:33

0 Answers0