Exocore / exocore-web /templates /cpp /install.sh
ChoruYt's picture
Upload 216 files
a7f51f5 verified
Raw
History Blame Contribute Delete
585 Bytes
#!/bin/bash
set -e
echo "[Exocore] Checking C++ compiler..."
GPP=$(which g++ 2>/dev/null || which c++ 2>/dev/null || which clang++ 2>/dev/null || echo "")
if [ -z "$GPP" ]; then
echo "[Exocore] No C++ compiler found. Installing g++ via nix-env..."
nix-env -iA nixpkgs.gcc 2>/dev/null || true
GPP=$(which g++ 2>/dev/null || echo "")
fi
if [ -z "$GPP" ]; then echo "[Exocore] ERROR: No C++ compiler available." && exit 1; fi
echo "[Exocore] C++ compiler: $GPP"
echo "[Exocore] Compiling main.cpp..."
$GPP -o main main.cpp -std=c++17
echo "[Exocore] Build successful! Run: ./main"