简体   繁体   中英

Visual Studio 2012 static library with Visual Studio 2017

I am building a static library with Visual Studio 2012 (C++), and want to give it to someone with Visual Studio 2017 so they can build their app and link against it. I will also provide the header files for them to use (but no source code that builds the library). The question is, will they be able to use the 2012 static libraries?

You cannot mix platform toolsets.

However, you can use the 2017 IDE with the 2012 platform toolset, via all project properties in your solution, if you have both versions installed.

A better solution would be to upgrade the library in question to 2017, which shouldn't be too terrible of a chore in most cases.

Absolutely not.

They will either need to build the static libraries themselves or you'll have to ship 2017 versions, and tell them comprehensively which compiler and optimisation settings were used. Therefore I would plump for the former if I were you.

Building an application binary interface (ABI for short) is extremely challenging in C++ - it's one thing that's been lost from the language's roots in C.

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