0

I have a C++ project which I'm trying to compile, and it references functions which are defined in a pre-compiled library file.

When I try to build my project I get the error:

LINK : fatal error C1047: The object or library file 'offending_library.lib' was created with an older compiler than other objects; rebuild old objects and libraries

The error message is clear enough, but I don't have the sources for the old objects so need to look at using the old compiler instead. I have researched other questions showing how I can install older toolsets, e.g.:

How to select an older compiler in Microsoft Visual C++ 2019?

Using a v90 Platform toolset on VisualStudio 2010

It seems that sometimes this can be done without installing the relevant version of Visual Studio (which I'd prefer as apparently advice is to remove any existing installs and re-install them in chronological order).

However, first I need to know which "older compiler" was used. Is there a way to determine that?

kabdulla
  • 5,199
  • 3
  • 17
  • 30
  • I think your bigger concern should be the lack of sources. – Sam Varshavchik Nov 04 '20 at 15:05
  • 1
    Out of curiosity, is this a static library or an import library? The former (at least) is [talked about here](https://stackoverflow.com/questions/1411854/is-there-a-way-to-determine-which-version-of-visual-studio-was-used-to-compile-a). – WhozCraig Nov 04 '20 at 15:07
  • Not an exact duplicate, but may be useful: https://stackoverflow.com/q/4554510/10553341 – Damien Nov 04 '20 at 15:07
  • @WhozCraig: It is a static library and [this](https://stackoverflow.com/a/10920599/4988601) answer at the question you linked to worked very nicely. Have upvoted there. Will mark my question as duplicate. – kabdulla Nov 04 '20 at 18:51

0 Answers0