简体   繁体   中英

Link to a static .lib compiled with VS2010 when I'm compiling with VS2013?

I have third party library that is a static .lib file that they tell me was compiled with VS2010. We develop our application in VS2013 and need to link to this library.

When we try, we get this error:

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

Does this mean we will have to use VS2010 compiler to link to it? (we cannot get a recompiled version of the library)

More or less; yes.

Generally, all parts of a C++ program needs to be compiled and linked with the exact same compiler (including exact compiler version).

Usually you also need to use the same compiler options when building the different parts.

There are exceptions, but that's the general rule of thumb.

There is no standardized C++ ABI.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM