

This article is part of a series on developing a C++ library and program using Visual Studio Code. Next up is unit testing with Google Test. In this article, we changed our library from static to shared. Read the README.md file for information about using the repository. The source code for the project up to this point is located in the shared_libs directory in my vscode-cmake-hello GitHub repository. Target_compile_features(hello PUBLIC cxx_std_20)Īdd_custom_command(TARGET hello POST_BUILD (In earlier versions, these tools were included in the stand-alone. The Visual Basic and C compilers are also included in this download. The code doesn't actually use any of them. If you dont have Visual Studio installed on your computer, you can use Build Tools 2013 to build managed applications. Stack Exchange network consists of 181 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers. # PUBLIC needed to make both hello.h and hello library available elsewhere in project

Here is the CMakeLists.txt file for the hello library from the first article: # version 3.11 or later of CMake or needed later for installing GoogleTestĬmake_minimum_required(VERSION 3.11-3.18)

In this article, we will modify the project to create and use a shared library. In that article, we built a small static library and an application to use that library. This article builds on the project that we started in the first article in this series.
