{"id":29661690,"url":"https://github.com/cwchentw/go-c-cpp-mix","last_synced_at":"2025-07-22T10:07:44.857Z","repository":{"id":77782876,"uuid":"56444251","full_name":"opensourcedoc/go-c-cpp-mix","owner":"opensourcedoc","description":"Using C++ Class in Golang","archived":false,"fork":false,"pushed_at":"2025-06-08T10:49:15.000Z","size":10,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-21T01:37:49.516Z","etag":null,"topics":["cgo","cpp","golang-examples"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/opensourcedoc.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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2016-04-17T15:39:29.000Z","updated_at":"2025-06-08T10:49:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"f557e49a-d916-4c16-a274-79af7646806f","html_url":"https://github.com/opensourcedoc/go-c-cpp-mix","commit_stats":null,"previous_names":["cwchentw/go-c-cpp-mix"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/opensourcedoc/go-c-cpp-mix","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensourcedoc%2Fgo-c-cpp-mix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensourcedoc%2Fgo-c-cpp-mix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensourcedoc%2Fgo-c-cpp-mix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensourcedoc%2Fgo-c-cpp-mix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opensourcedoc","download_url":"https://codeload.github.com/opensourcedoc/go-c-cpp-mix/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensourcedoc%2Fgo-c-cpp-mix/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266473107,"owners_count":23934477,"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","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":["cgo","cpp","golang-examples"],"created_at":"2025-07-22T10:07:44.719Z","updated_at":"2025-07-22T10:07:44.840Z","avatar_url":"https://github.com/opensourcedoc.png","language":"C++","readme":"# Using C++ Classes in Go\n\nGo programs can interface with C libraries using **cgo**. However, cgo does not natively support C++ classes or functions. To work around this limitation, C++ code must be wrapped in a C-compatible interface.\n\nThis repository provides a minimal working example demonstrating how to:\n\n* Wrap a C++ class with a plain C interface\n* Compile and link the C++ code as a shared library\n* Call C++ class methods from Go using cgo through the C wrapper\n\nThis technique is useful when integrating Go applications with existing C++ codebases or leveraging C++ libraries in a Go environment.\n\n---\n\n## License\n\nApache License 2.0\nCopyright (c) 2019–2020, ByteBard\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcwchentw%2Fgo-c-cpp-mix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcwchentw%2Fgo-c-cpp-mix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcwchentw%2Fgo-c-cpp-mix/lists"}