{"id":18739599,"url":"https://github.com/springmeyer/learn-c","last_synced_at":"2025-08-21T12:33:16.744Z","repository":{"id":66365754,"uuid":"47426464","full_name":"springmeyer/learn-c","owner":"springmeyer","description":"Learning C from scratch (compilers, linkers, build systems)","archived":false,"fork":false,"pushed_at":"2017-07-31T23:05:30.000Z","size":8,"stargazers_count":11,"open_issues_count":1,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-12T20:03:07.645Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/springmeyer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-12-04T20:11:00.000Z","updated_at":"2022-08-06T01:16:50.000Z","dependencies_parsed_at":"2023-02-20T16:15:40.328Z","dependency_job_id":null,"html_url":"https://github.com/springmeyer/learn-c","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/springmeyer%2Flearn-c","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/springmeyer%2Flearn-c/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/springmeyer%2Flearn-c/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/springmeyer%2Flearn-c/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/springmeyer","download_url":"https://codeload.github.com/springmeyer/learn-c/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248625493,"owners_count":21135513,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T15:36:27.531Z","updated_at":"2025-04-12T20:03:58.996Z","avatar_url":"https://github.com/springmeyer.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# learn c\n\nExamples of hello world C programs, libraries, headers and details of how to compile, link, and run from scratch (without using a build system like Make, cmake, or gyp).\n\n[![Build Status](https://travis-ci.org/springmeyer/learn-c.svg?branch=master)](https://travis-ci.org/springmeyer/learn-c)\n\n## Requires\n\n - clang compiler\n\n## Usage\n\nTo build all examples:\n\n```sh\n./build-all.sh\n```\n\nTo test all examples:\n\n```sh\n./test-all.sh\n```\n\nTo build and test a specific example:\n\n```sh\ncd step_1\n./build.sh\n./test.sh\n```\n\nTo build and test a specific example without causing your\nworking directory to change:\n\n```sh\n(cd step_1 \u0026\u0026 ./build.sh \u0026\u0026 ./test.sh)\n```\n### definitions\n\n#### compiler\n\nCommand line tool, like gcc or clang, that can compile and link code\n\nC compilers are gcc and clang. C++ compilers are g++ and clang++.\n\n#### linker\n\nThe linker is usually called `ld`. But you don't need to invoke it directly. Instead it gets invoked by the compiler.\n\n#### compile\n\nTurn C or C++ code into `.o` (object files)\n\n#### link\n\nTurn object files into either and executable or a library\n\n#### Build system\n\nNot going to find one here! Actually that is a lie. Here we use bash scripts called `build.sh` to invoke the compiler to compile and link. For larger projects you'll want to use a build system like cmake, ninja, make, or gyp that is able to intelligently recompile and link only when certain files have changed.\n\n#### Extra handy tools\n\n - `nm` shows symbols (aka functions/methods) inside a library\n - `otool -L` shows what dynamic a program links to on OS X\n - `ldd` shows what dynamic a program links to on linux\n - `readelf -d` shows rpaths and other special things about a library on linux\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspringmeyer%2Flearn-c","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspringmeyer%2Flearn-c","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspringmeyer%2Flearn-c/lists"}