{"id":22625524,"url":"https://github.com/thomasms/fortc","last_synced_at":"2026-04-27T12:39:43.911Z","repository":{"id":49279672,"uuid":"469894529","full_name":"thomasms/fortc","owner":"thomasms","description":"Fortran to C (and back again) examples","archived":false,"fork":false,"pushed_at":"2022-03-14T21:19:09.000Z","size":13,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-02T21:06:04.010Z","etag":null,"topics":["bindings","c","cpp","fortran","iso","modern-fortran"],"latest_commit_sha":null,"homepage":"","language":"Fortran","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thomasms.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-03-14T20:29:46.000Z","updated_at":"2022-07-24T02:47:01.000Z","dependencies_parsed_at":"2022-08-30T00:40:31.097Z","dependency_job_id":null,"html_url":"https://github.com/thomasms/fortc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/thomasms/fortc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasms%2Ffortc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasms%2Ffortc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasms%2Ffortc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasms%2Ffortc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thomasms","download_url":"https://codeload.github.com/thomasms/fortc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasms%2Ffortc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32337274,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"online","status_checked_at":"2026-04-27T02:00:06.769Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["bindings","c","cpp","fortran","iso","modern-fortran"],"created_at":"2024-12-09T00:26:07.143Z","updated_at":"2026-04-27T12:39:43.873Z","avatar_url":"https://github.com/thomasms.png","language":"Fortran","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fortran to C API test\n\nFortran to C (and back again) examples. I get asked many times how can you call Fortran from C++ or from C and vice versa, well this is my example of how to do it.\n\n## Error library\nA very basic error library is written in C++ and we provide a C interface for it.\n\nThis can be found in the `errorapi` directory.\n\n\n## Input library\nThis illustrative (but nonsensical) library shows how to write functions in Fortran (modern) and bind to C.\n\nThe implementation is found in the `fortranlib` directory.\nThe interface can be found in the `api` directory.\n\nNote that this Fortran implementation uses the C++ Error implementation through its C API.\n\n## Example programs\n\nTwo stupid C++ programs are provided to show how to use this API via their corresponding C interfaces.\n\nOne tests for memory leaks: `memoryprogram`.\n\nThe other tests the error/logger: `testprogram`.\n\n## More to do....\n\n- [ ] Add Fortran program example\n- [ ] Add C program example\n- [ ] Setup some tests using toast\n\n## License\nBSD-3-Clause License\n\nWork of Thomas Stainer\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomasms%2Ffortc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthomasms%2Ffortc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomasms%2Ffortc/lists"}