A school project as of 10/09/2024 creating a point-of-sale system in C++
For my fellow groupmates, please refer to GUIDE.md to setup your editor and start contributing to the source code.
After knowing how to contribute, please install these extensions on VsCode:
- Clang-Format
- C/C++
- Makefile Tools
Then, to automatically format the file you're working on, follow these steps if you are using VsCode:
- Click
Ctrl+Shift+p - A command line should appear, type "User Settings".
- Click on User Preferences (JSON)
- On the JSON, add this:
{
"editor.formatOnSave": true
}Prerequisites
- If you don't have MSYS2, you can go to their website to download it
After that, add the PATH to your computer's env variables. It's generally in C:\msys64\mingw64\bin, where your
MSYS2 executable files are stored.
- g++ or gcc compiler (if you don't have it yet and you have MSYS2 already, just run these on MSYS2-Mingw64 or MSYS2-Mingw32 terminal):
pacman -S mingw-w64-x86_64-gccIf you are using the 32-bit version of MSYS2:
pacman -S mingw-w64-i686-gcc- cmake (if you don't have it yet and you have MSYS2 already, just run these on MSYS2-Mingw64 or MSYS2-Mingw32 terminal):
pacman -S mingw-w64-x86_64-cmakeIf you are using the 32-bit version of MSYS2:
pacman -S mingw-w64-i686-cmakeNow that you have cmake, you can start compiling the project by running this on your code editor's terminal:
Create a folder/directory named build and go there
mkdir build && cd buildRun cmake:
cmake .. -DENVIRONMENT=productionRun cmake to build:
cmake --build .This will create a bin folder/directory under the build folder/directory. To run the project, run:
./bin/main.exeTo run the tests:
./bin/main_test.exe