Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

autoBuildC

Windows: Copy and paste the executable into the path: C:\Windows\System32 (Global)

autoBuildC is a simple helper for Windows and Linux (Ubuntu) that uses g++ or gcc (GNU). This application, nicknamed cbuild, helps you quickly compile all .c or .cpp files in the current or selected directory. It scans project folders and subfolders for files with the selected extensions.

Features

  • Recursively scans for all .c or .cpp source files.
  • Automatically compiles the sources using the appropriate compiler.
  • Allows you to specify the output executable name.
  • Visual mode prints all detected file paths before compiling.
  • Supports both C and C++ source file filters.
  • Instantly run your compiled program if the build succeeds.
  • Easy shortcut to apply maximum performance optimization flags.

Example

Usage

cbuild [options]

Options

  • -path <dirname> Enter your project path. Default is where cmd was started.

  • -flags <multi-flags> To use with other flags in your project..

  • -gcc Filters and compiles only .c files using gcc. Default option.

  • -g++ Filters and compiles only .cpp files using g++.

  • -logs Enables visual mode, which prints out the full paths of all detected source files before compiling.

  • -name <filename> Sets the output executable name. Default is main.exe.

  • -run Executes the program automatically after a successful build.

  • -fast Applies -O3 and -march=native flags for maximum execution performance.

Example Commands

Compile all .c files with gcc and show the file paths:

cbuild -gcc -logs

Compile in static mode all .cpp files with g++ and name the output myApp.exe:

cbuild -g++ -flags "-static" -name myApp.exe

Compile for high performance, show the logs, and run immediately after building:

cbuild -g++ -fast -logs -run

Notes

  • This tool was initially created for Windows, but it is now compatible with Linux systems.

  • Make sure that gcc or g++ is available in your system's PATH.

License

This project is open source and free to use.

About

Helper in finding the cpp or c files to build your program

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages