Making and Working with Libraries in C++ (Multiple Projects in Visual Studio)
Why Stack Overflow recommends it
Stack Overflow users link it when someone needs a walkthrough of creating and linking a static library across multiple Visual Studio projects in C++.
Recommended by 1 people across 1 different months, 2018 to 2024.
What it is
A 12-minute tutorial from The Cherno's C++ series showing how to split a Visual Studio solution into multiple projects, build a static library, and link it into an executable project. It covers project configuration, include directories and referencing one project from another.
What people said
Recommends user11568109 · 2019-09 · Stack Overflow · on “Hiding the Contents of a Header File”
Create a static or dynamic library of Solution.h, compile it, and link it with the project. The students now get the header of the solution with declarations, but not definitions. The library topic is a little bit too complex to explain in one answer. Watch the video from TheChernoProject ( [this video] ) for it. Another way would be, making the code unreadable (defines) or put it in asm blocks.
Cites Elsa · 2018-02 · Stack Overflow · on “Can't compile the static library project with visual studio 2017”
I was trying to build my own static library(.lib) using codes in this tutorial [LINK] . But first of all, static library project will generate a stdafx.h , a targetver.h and a stdafx.cpp for me automatically, so I have to include stdafx.h in all my source files. But once I did that, the project still refuses to compile because now it thinks that YJMagic is not a class or namespace name . Then I checked the project's properties and found out the stdafx.h is already my precompiled header file. So maybe it won't compile because there is a double include problem? Then because I can't figure out a solution, I did it another way: I create an empty project, use the same source file and header file,
Cites user25257007 · 2024-05 · Stack Overflow · on “raylib + cURLpp == C2733 you cannot overload a function with 'extern "C" '”
FIXED: I separated the visual studio solution into 2 projects, one was used for cURL (static library) and the other for raylib (.exe). I also put all the cURL code inside a namespace and now I don't get any errors and can create a window with raylib and do https requests with cURL no problem This video helped me out [this video] *Thanks for all the help btw :)