For those who want to just GO, Get Started Now
- Clone
git clone https://github.com/coffeebe4code/cons.git
- Ensure you have
clang
orgcc
installed, and is a relatively newer version.gcc --version
orclang --version
- many versions should work, the project is compiled with
-Werror -Wall -Wextra
. And various versions of gcc and clang will have different criteria which may result in errors for the source code. - all have been very simple to change, see Contributing for a quick way to fix the issue and commit to source. If you do not have the time, submitting a bug report for the OS, gcc version, and the list of errors reported, I will fix them asap.
-
You must have pthreads installed and visible for your compiler.
-
Bootstrap
nobuild
, the build system forcons
.
- At the root of the project run
gcc -Wall -Werror -Wextra -pthread -O3 -o ./nobuild ./nobuild-gcc.c
- be sure to substitube
clang
as the command andnobuild-clang.c
if you intend to build with clang
- build the project with
./nobuild
this will build the debug version. You can skip tests or run the release build with./nobuild -s -r
All binaries and libraries will be placed in the ./target
directory.
- NOTE:: Mac debug version has an issue with debugging in gdb.
We must set up the Mingw64 toolchain for building source as windows binaries.
- Download the
msys2
system. I recommend using their installer on their website.
- Their installation guide found on the main page is nearly everything we will need.
- After step 7 in previously linked mys2 guide, run
pacman -S git
so that we can clone the source code forcons
.
- Clone the
cons
repository.git clone https://github.com/coffeebe4code/cons.git
- This will be added to the
home
folder within themsys2
environment. If you changed directories or created one, just take note of where this was done. - You can proceed to step 8 on previously linked msys2 installation guide. I typically just go to where msys2 was installed, and find the mingw64 terminal and run it from there. I will also pin this new terminal to the task bar.
- With the Mingw64 shell open, change your directory to where you installed cons,
cd ~/cons
for those who ran the git clone at the home or default directory. - Now you can bootstrap the build system run
gcc -Wall -Werror -Wextra -pthread -O3 -o ./nobuild ./nobuild-win.c
- You may now run any
./nobuild
command, add-s
to skip tests, and/or-r
to build the release version. the release version is significantly faster than the debug version. - The windows version of cons is completely self contained and does not need any dll's to run on a windows system, it does not need any fancy directory, just ensure to add any of the binaries you wish to the PATH System Environment variable.
- if you used the default everything you would need to add
C:\\msys2\home\cons\target
to your PATH variable in your System Environment Variables.