{"id":19423219,"url":"https://github.com/atomjoy/cpp","last_synced_at":"2026-02-21T16:38:57.272Z","repository":{"id":235180236,"uuid":"257027934","full_name":"atomjoy/cpp","owner":"atomjoy","description":"Programowanie w c++, g++","archived":false,"fork":false,"pushed_at":"2024-08-29T09:03:35.000Z","size":733,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-23T18:40:20.338Z","etag":null,"topics":["cpp-basic","cpp-fps","cpp-game","cpp-graphics","cpp-opengl","cpp-sfml","cpp-win-gtk","kompilacja"],"latest_commit_sha":null,"homepage":"","language":null,"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/atomjoy.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":"2020-04-19T15:00:30.000Z","updated_at":"2024-08-29T09:03:38.000Z","dependencies_parsed_at":"2024-04-22T15:40:35.204Z","dependency_job_id":"313ef782-e07b-4380-b5bf-726dea08f261","html_url":"https://github.com/atomjoy/cpp","commit_stats":null,"previous_names":["atomjoy/cpp"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/atomjoy/cpp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomjoy%2Fcpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomjoy%2Fcpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomjoy%2Fcpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomjoy%2Fcpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/atomjoy","download_url":"https://codeload.github.com/atomjoy/cpp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomjoy%2Fcpp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29686798,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T15:51:39.154Z","status":"ssl_error","status_checked_at":"2026-02-21T15:49:03.425Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["cpp-basic","cpp-fps","cpp-game","cpp-graphics","cpp-opengl","cpp-sfml","cpp-win-gtk","kompilacja"],"created_at":"2024-11-10T13:37:28.369Z","updated_at":"2026-02-21T16:38:57.256Z","avatar_url":"https://github.com/atomjoy.png","language":null,"readme":"## G++\nProgramowanie w C++ (g++ linux curl, opengl, sfml, thread).\n\n### Instalacja\nhttps://github.com/atomjoy/cpp/blob/master/cpp-wiki/0-install.md\n\n### Kompilacja\nhttps://github.com/atomjoy/cpp/blob/master/cpp-wiki/1-compile.md\n```bash\n# Kompiluj\nsudo g++ -c main.cpp\n# Lub\nsudo g++ -c main.cpp -o main.o\n\n# Plik wykonywalny\ng++ -o main-app main.o\n\n# Uruchom\n./main-app\n```\n\n### Kompilacja parametry\n```bash\n# Błędy, debugowanie\n-g -Wall -pedantic \n\n# Import bibliotek\n-std=c++11 -lpthread -lcurl -I. -L.\n\n# Import gtk\n`pkg-config --cflags --libs gtk+-3.0 gtkmm-3.0 giomm-2.4 gl`\n\n# Import SFML\n-lsfml-graphics -lsfml-window -lsfml-system\n```\n\n### Przykład kodu\n```cpp\n/*\nKompilacja\nsudo g++ -c main.cpp -std=c++11 -lpthread\nsudo g++ -o main-app main.o -std=c++11 -lpthread\n./main-app\n\nLub\nsudo g++ main.cpp -std=c++11 -pthread -o main-app\n*/\n#include \u003ciostream\u003e\n#include \u003cthread\u003e\n#include \u003cchrono\u003e\n\n//This function will be called from a thread\nvoid call_from_thread(int n) {  \n  // std::this_thread::sleep_for(std::chrono::milliseconds(200));\n  std::this_thread::sleep_for(std::chrono::seconds(n));\n  std::cout \u003c\u003c \"Hello, World from thread \" \u003c\u003c n \u003c\u003c std::endl;\n}\n \nint main() {\n  \n  std::cout \u003c\u003c \"Hello, World from main thread \" \u003c\u003c std::endl;\n  \n  //Launch a thread\n  std::thread t1(call_from_thread, 1);\n  std::thread t2(call_from_thread, 2);\n \n  //Join the thread with the main thread\n  t1.join();\n  t2.join();\n  \n  std::cout \u003c\u003c \"Bye, from main thread \" \u003c\u003c std::endl;\n  \n  return 0;\n}\n```\n\n### Przykład pliku Makefile\nnano Makefile\n```bash\nCXX = g++\nCXXFLAGS = -Wall -g -pedantic\nCXXCMD = -std=c++11 -lpthread -lcurl\nCXXSFML = -lsfml-graphics -lsfml-window -lsfml-system\nCXXGTK = `pkg-config --cflags --libs gtk+-3.0 gtkmm-3.0 giomm-2.4 gl`\n\nall: main-app\n\nmain-app: main.o Date.o Num.o\n\t$(CXX) $(CXXFLAGS) $(CXXGTK) $(CXXSFML) $(CXXCMD) -o main-app main.o Date.o Num.o\n\nmain.o: main.cpp Date.h Num.h\n\t$(CXX) $(CXXFLAGS) $(CXXGTK) $(CXXCMD) -c main.cpp\n\nDate.o: Date.h\nNum.o: Num.h\n\nclean:\n\trm -rf main-app *.o\n```\n\n### Uruchom Makefile\n```bash\n# Uruchom kompilację\nsudo make\n\n# Wyczyść\nsudo make clean\n```\n\n### Visual Code C++ Run Task config\nhttps://github.com/atomjoy/cpp/blob/master/.vscode/tasks.json\n```.json\n// See https://go.microsoft.com/fwlink/?LinkId=733558\n// for the documentation about the tasks.json format\n// ${fileDirname}\n// ${fileBasenameNoExtension}\n// ${workspaceFolderBasename}\n    \n{    \n    \"version\": \"2.0.0\",\n    \"tasks\": [\n        {\n            \"type\": \"shell\",\n            \"label\": \"BUILD NOW\",\n            \"command\": \"g++\",\n            \"args\": [\n                \"-g\",\n                \"-Wall\",\n                \"-pedantic\",\n                \"${file}\",\n                \"-o\",\n                \"${fileBasenameNoExtension}\"\n            ],\n            \"problemMatcher\": [],\n            \"group\": \"build\"\n        },\n        {\n            \"type\": \"shell\",\n            \"label\": \"RUN NOW\",\n            \"command\": \"./${fileBasenameNoExtension}\",\n            \"dependsOn\": [\n                \"BUILD NOW\"\n            ],\n            \"problemMatcher\": []\n        }\n    ]\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatomjoy%2Fcpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatomjoy%2Fcpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatomjoy%2Fcpp/lists"}