A command line tool to monitor for any changes in your C file and automatically recompile and execute it based on gcc. Be inspired by nodemon.
See how it works: https://cmon.clang.cool
cmon demo.c
- Click here to download
cmon-setup.exe
. - Double click the
cmon-setup.exe
and finish the installation. - Restart your PC
- Open
Command Prompt
and test the installation:
cmon -v
Tip: the installation directory is C:\Program Files (x86)\cmon
.
- Run this command to download
cmon
:
sudo curl -L "https://github.com/tsq/cmon/releases/download/v1.0.1/cmon" -o /usr/local/bin/cmon
- Apply executable permissions to the binary:
sudo chmod +x /usr/local/bin/cmon
- Test the installation:
cmon -v
- Run this command to download
cmon
:
sudo curl -L "https://github.com/tsq/cmon/releases/download/v1.0.1/macos_cmon" -o /usr/local/bin/cmon
- Apply executable permissions to the binary:
sudo chmod +x /usr/local/bin/cmon
- Test the installation:
cmon -v
Tip: when you run the cmon
command at first time, you maybe see an error dialog, the message is like this:
“cmon” cannot be opened because the developer cannot be verified.
to fix this problem, your should:
- go to
System Preferences
>Security & Privacy
. - click the
Click the lock to make changes
on the bottom then input your password or using Touch ID - click
Allow Anyway
right of the warning message"cmon was blocked from use because it is not from an identified developer."
This tool will made your C-Learning-Life happy.
before
gcc demo.c -o demo # compile
./demo # execute
111 # show result
# change the demo.c
gcc demo.c -o demo # compile
./demo # execute
222 # show result
# change the demo.c
gcc demo.c -o demo # compile
./demo # execute
333 # show result
...
now
cmon demo.c # compile and execute it
111
# change the demo.c
222 # show result
# change the demo.c
333 # show result
- The
gcc
need to be available on your machine. - This tool just support
gcc
compiler no other compilers like clang. - It just supports compiling a single c file.
- It doesn't support passing command-line arguments