A properly install compiler that supports the C++20 Standard such as:
- Clang 14.0.0 or greater
- GCC 11.0.0 or greater
- Intel® oneAPI DPC++/C++ Compiler 2022.2.1 or greater
- Visual Studio 2019 version 16.11.2 or greater
as well as CMake. You will often need a build system for CMake such as:
If your RTL does not support std::format, you will also need the {fmt} library.
MSYS2 now includes efxc2 as a mingw-64 package so you can install it with pacman with the command pacman -S [package name]
. You
can search for the appropriate "efxc2" package with the command pacman -Ss efxc2
.
If you prefer to compile it for yourself, do the following:
- Install CMake using
pacman -S [package name]
.
You can find what versions are available with the commandpacman -Ss cmake
. - Download the PKGBUILD file and place it in an empty directory named
mingw-w64-efxc2
. - Change the current directory to where you downloaded the PKGBUILD and
enter
makepkg-mingw
to build efxc2. - Install the packages you created using
pacman -U [package name]
.
MSYS2 Environment
- Install CMake using
pacman -S cmake
. - Download the PKGBUILD file and place it in an empty directory named
efxc2
. - Change the current directory to where you downloaded the PKGBUILD and
enter
makepkg
to build efxc2. - Install the packages you created using
pacman -U efxc2
.
For Cygwin, if you are using GCC 11.4.0, you will require the fmt library. If you are using a test version of GNU GCC from the Cygwin setup utility, no extra library is required.
- To compile this program for Cygwin, make a directory for building the files then enter:
cmake -GNinja [source directory]
cmake --build .
- To run tests on this build, enter the following:
cmake --build . --target test
- To install this program, enter the following:
DESTDIR="[installation prefix of your choice]" cmake --install .
To compile this program:
- Make a directory where you wish to build the program. This should be separate from the directory where you extracted the source-code.
- Change the current directory to this build directory.
- Enter commands such as
cmake.exe -GNinja -DCMAKE_INSTALL_PREFIX=[installation path] [source-directory]
andcmake.exe --build .
. - Install the program to desired path you specified in the
CMAKE_INSTALL_PREFIX with a command such as
cmake --install
.
Alternatively, you can simply copy the .exe from the "Release" or "Debug" directory to the location you desire.
An example I use on the Intel oneAPI command prompt is this:
cmake ../ -G"Visual Studio 17 2022"
cmake --build .
where I am building from a subdirectory under the source-code.