{"id":19720959,"url":"https://github.com/paramsiddharth/c-linking-libraries","last_synced_at":"2026-03-05T06:01:24.318Z","repository":{"id":109333017,"uuid":"371889355","full_name":"paramsiddharth/c-linking-libraries","owner":"paramsiddharth","description":"Linking libraries in C, statically and dynamically.","archived":false,"fork":false,"pushed_at":"2021-05-29T07:35:47.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-18T06:38:09.949Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Makefile","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/paramsiddharth.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}},"created_at":"2021-05-29T05:35:33.000Z","updated_at":"2021-05-29T07:35:49.000Z","dependencies_parsed_at":"2023-04-17T09:48:44.356Z","dependency_job_id":null,"html_url":"https://github.com/paramsiddharth/c-linking-libraries","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/paramsiddharth/c-linking-libraries","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paramsiddharth%2Fc-linking-libraries","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paramsiddharth%2Fc-linking-libraries/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paramsiddharth%2Fc-linking-libraries/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paramsiddharth%2Fc-linking-libraries/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paramsiddharth","download_url":"https://codeload.github.com/paramsiddharth/c-linking-libraries/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paramsiddharth%2Fc-linking-libraries/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30111779,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T03:40:26.266Z","status":"ssl_error","status_checked_at":"2026-03-05T03:39:15.902Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-11T23:13:01.899Z","updated_at":"2026-03-05T06:01:24.269Z","avatar_url":"https://github.com/paramsiddharth.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Linking Libraries in C\nExamples of static and Dynamic linking of libraries in C,\nplus how to create such libraries.\n\n## Notes\n-\tThe examples container here strictly use GCC as the\n\tcompiler. For *NIX use the general GNU distribution\n\tof GCC, and for Windows, use MinGW-w64.\n-\tThe `-s` flag is used extensively throughout the examples\n\tin this repository, but it must be noted that it is totally\n\toptional and used here only to reduce the output filesize by\n\tremoving all symbol table and relocation information.\n\n## Instructions\nFor different types of linking, I have made:\n1. `static`: Static Linking.\n2. `dynamic`: Dynamic Linking.\n\nWithin each, I have added examples for *NIX and Windows:\n1. `nix`: *NIX.\n2. `win`: Windows.\n\nEach of the two contains a `Makefile` with a simple\ninstruction to clean all files built.\n\nWithin each of those two, I have created:\n1. `library`: The library source code and `Makefile`.\n2. `usage`: A simple usage of the same, with the `Makefile`.\n\nThe `Makefile`s within those two directories contain a default `build` instruction to compile the code, and\na `clean` instruction to clean all files `built`.\n\n## Information\n-\tThe 'link' being referred to in 'symbolic link'\n\tand the one in 'static/dynamic link' are completely\n\tunrelated.\n-\tThe source code used for the sample library and the\n\ttesting file is container inside `src` in the repository's\n\troot. The source files are symbolically linked into the\n\tdesired places, so please ensure you have enabled symbolic\n\tlinks in Git before cloning.\n\t```bash\n\tgit config --global core.symlinks true\n\t```\n-\tIn Windows systems, this would also require you to clone via\n\ta console with administrative priviledges, because creating\n\tsymbolic links would require them.\n-\tGit won't warn you if you clone without giving\n\tadministrative privileges: It will simply create copies\n\tof files instead of symbolcally linking them,\n\teven if you have the global `core.symlinks` set to\n\t`true`. This would\n\tstill allow everything to work, but if you need to edit,\n\tfor example, `main.c`, the changes won't reflect everywhere\n\t`main.c` is being used.\n-\tTo enforce symbolic links while creating the clone,\n\tuse\n\t```bash\n\tgit clone -c core.symlinks=true https://url/to/repo\n\t```\n\tYou don't need to enforce this if you are running\n\tthe command-line with administrative privileges.\n-\tIf you have Developer Mode enabled in Windows 10,\n\tyou won't need to grant administrative privileges for\n\tusing symbolic links.\n\n# Made with ❤ by [Param](https://www.paramsid.com).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparamsiddharth%2Fc-linking-libraries","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparamsiddharth%2Fc-linking-libraries","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparamsiddharth%2Fc-linking-libraries/lists"}