https://github.com/alexandru-dinu/igcc Skip to content Toggle navigation Sign up * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code Explore + All features + Documentation + GitHub Skills + Blog * Solutions For + Enterprise + Teams + Startups + Education By Solution + CI/CD & Automation + DevOps + DevSecOps Resources + Learning Pathways + White papers, Ebooks, Webinars + Customer Stories + Partners * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Pricing Search or jump to... Search code, repositories, users, issues, pull requests... Search [ ] Clear Search syntax tips Provide feedback We read every piece of feedback, and take your input very seriously. [ ] [ ] Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Name [ ] Query [ ] To see all available qualifiers, see our documentation. Cancel Create saved search Sign in Sign up You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert {{ message }} alexandru-dinu / igcc Public * Notifications * Fork 11 * Star 134 Interactive GCC - C/C++ REPL. sourceforge.net/projects/igcc/ License GPL-3.0 license 134 stars 11 forks Activity Star Notifications * Code * Issues 7 * Pull requests 0 * Discussions * Actions * Projects 0 * Security * Insights More * Code * Issues * Pull requests * Discussions * Actions * Projects * Security * Insights alexandru-dinu/igcc This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. master Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags Name already in use A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch? Cancel Create 1 branch 0 tags Code * Local * Codespaces * Clone HTTPS GitHub CLI [https://github.com/a] Use Git or checkout with SVN using the web URL. [gh repo clone alexan] Work fast with our official CLI. Learn more about the CLI. * Open with GitHub Desktop * Download ZIP Sign In Required Please sign in to use Codespaces. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching Xcode If nothing happens, download Xcode and try again. Launching Visual Studio Code Your codespace will open once ready. There was a problem preparing your codespace, please try again. Latest commit @alexandru-dinu alexandru-dinu Run black. ... 84f68c7 Feb 11, 2021 Run black. 84f68c7 Git stats * 62 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time .github/workflows Create initial workflow for testing. January 25, 2021 15:56 libigcc Run black. February 11, 2021 23:20 tests/lib-test Simplify tests. January 25, 2021 15:32 .gitignore Use Python.gitignore. January 25, 2021 13:28 .gitpod.Dockerfile Add Gitpod config January 16, 2020 09:34 .gitpod.yml Add Gitpod config January 16, 2020 09:34 LICENSE Create LICENSE November 27, 2020 13:55 README.md Run black. February 11, 2021 23:20 config.yaml Move config.yaml top-level. January 25, 2021 16:46 igcc [bug] selects python3 explicitly in igcc December 12, 2020 17:59 requirements.txt Add single PyYAML requirement. January 25, 2021 16:09 View code Interactive GCC Running Usage Links Credits README.md Interactive GCC workflow contrib gitpod Code style: black NOTE: This is forked from https://sourceforge.net/projects/igcc/. I have done some refactoring and ported it to Python 3.7. I am currently maintaining it. * Interactive GCC (igcc) is a read-eval-print loop (REPL) for C/C++ * A default libigcc/boilerplate.h header is included, with , using namespace std;, and some helper functions * For configuration (mainly related to compiling) see config.yaml Running git clone https://github.com/alexandru-dinu/igcc.git cd igcc pip install -r requirements.txt ./igcc -I libigcc The code will be compiled with GCC and the results (if any) will be displayed. Type .h for help: [ 1] igcc> .h .L List the whole program as given to the compiler .e Show the last compile errors/warnings .h Show this help message .l List the code you have entered .q Quit .r Redo undone command .u Undo previous command Usage Simple usage: $ ./igcc -I libigcc [ 1] igcc> int a = 5; [ 2] igcc> a += 2; [ 3] igcc> cout << a << endl; 7 [ 4] igcc> --a; [ 5] igcc> cout << a << endl; 6 Include header files: $ ./igcc -I libigcc [ 1] igcc> #include [ 2] igcc> vector xs = {1,2,3}; [ 3] igcc> xs.push_back(17); [ 4] igcc> xs.pop_back(); [ 5] igcc> printf("%u", xs.size()); 3 Compile errors can be tolerated until the code works: $ ./igcc [ 1] igcc> for (int i = 0; i < 10; i++) { Compile error - type .e to see it OR disregard if multi-line statement(s) [ 2] igcc> cout << i << " "; Compile error - type .e to see it OR disregard if multi-line statement(s) [ 3] igcc> } 0 1 2 3 4 5 6 7 8 9 Libs can be linked: $ ./igcc -I libigcc -lpthread [ 1] igcc> #include [ 2] igcc> pthread_t thr; [ 3] igcc> const char* msg = "Hello, World!"; [ 4] igcc> // assuming print_msg is defined somewhere [ 5] igcc> int ret = pthread_create(&thr, NULL, print_msg, (void*) msg); pthread_join(thr, NULL); Hello, World! Links * IGCC home page * IGCC Sourceforge page * Andy Balaam's home page * Andy Balaam's blog Credits * Andy Balaam may be contacted on axis3x3 at users dot sourceforge dot net * IGCC is Copyright (C) 2009 Andy Balaam * IGCC is Free Software released under the terms of the GNU General Public License version 3 * IGCC comes with NO WARRANTY About Interactive GCC - C/C++ REPL. sourceforge.net/projects/igcc/ Topics cpp repl Resources Readme License GPL-3.0 license Activity Stars 134 stars Watchers 6 watching Forks 11 forks Report repository Contributors 4 * @alexandru-dinu alexandru-dinu Alexandru Dinu * @andybalaam andybalaam Andy Balaam * @kgashok kgashok Ashok Bakthavathsalam * @MarshallRawson MarshallRawson Languages * Python 88.7% * C++ 4.3% * Shell 3.9% * Dockerfile 3.1% Footer (c) 2023 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time.