- by x32x01 ||
If you’re using Code::Blocks and want to include the CS50 library to start coding with functions like
get_int() or get_string(), here’s how to do it step by step 🚀🧩 Step 1: Add the Library to the Compiler
- Right-click on your project in the Code::Blocks workspace.
- Select “Build Options” from the menu.
- Go to the Search Directories tab.
- Click on Compiler 🧱.
- Add the path to your CS50 library folder.
📂 Step 2: Add CS50 Header and Source Files
- Again, right-click on your project.
- Choose “Add files recursively”.
- Navigate to the folder containing your CS50 library files (like cs50.h and cs50.c).
- Add them to your project ✅.
⚙️ Step 3: Build and Run
After adding everything:- Click Build → Run ▶️
- Your CS50 functions should now compile and work perfectly inside Code::Blocks.
Last edited: