I have spend shit while setting up#24
Open
Butcher3Years wants to merge 1 commit intoUsing--Librariesfrom
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Dynamic Libraries in C++ – DLL Hell & Linking Pain (Cherno Style) 🪓💀
Branch:
dynamic-librariesFrom The Cherno's C++ series — the episodes where he screams about linker errors, missing DLLs at runtime, and why dynamic linking is both a blessing and a curse.
What the Fuck is a Dynamic Library?
A dynamic library (
.dllon Windows,.soon Linux,.dylibon macOS) is compiled code that your program loads at runtime instead of baking into your .exe.Cherno:
Why Use Dynamic Libraries?
How Dynamic Linking Works (Step-by-Step)
Compile your code with headers
#include <GLFW/glfw3.h>Tell linker where to find import lib
.libfile (Windows) or.so(Linux) contains symbols tableAt runtime — OS loads DLL
Using a Dynamic Lib (GLFW Example – Cherno Style)
Download GLFW pre-built binaries (or build yourself)
Copy files:
include/GLFW/glfw3.dll→ next to your exe (or in PATH)glfw3.lib(Windows import lib) → your lib folderCompile command (g++/MinGW)