> Installation_
Get Argus up and running on your system quickly with multiple installation options.
// Quick Installâ
- Linux
- macOS
- Windows
Compiler: GCC 13.0+ or Clang 14+
Package Managersâ
- vcpkg
- Meson
- XMake
# With Regex support (requires PCRE2)
vcpkg install argus[regex]
# Without Regex support (default)
vcpkg install argus
# Install as wrap dependency
meson wrap install argus
# With Regex support (requires PCRE2)
meson wrap install argus -Dregex=true
# Basic installation
xmake require argus
# With Regex support (requires PCRE2)
xmake require --extra="{configs={regex=true}}" argus
# XRepo alternative
xrepo install argus
xrepo install --configs="regex=true" argus
From Sourceâ
git clone https://github.com/lucocozz/argus.git
cd argus
meson setup builddir # -Dregex=true for regex support
meson compile -C builddir
sudo meson install -C builddir
Compiler: GCC 13.0+ or Clang 14+
Package Managersâ
- vcpkg
- Meson
- XMake
# With Regex support (requires PCRE2)
vcpkg install argus[regex]
# Without Regex support (default)
vcpkg install argus
# Install as wrap dependency
meson wrap install argus
# With Regex support (requires PCRE2)
meson wrap install argus -Dregex=true
# Basic installation
xmake require argus
# With Regex support (requires PCRE2)
xmake require --extra="{configs={regex=true}}" argus
# XRepo alternative
xrepo install argus
xrepo install --configs="regex=true" argus
From Sourceâ
# Install dependencies (if needed)
# Homebrew: brew install meson ninja
# MacPorts: sudo port install meson ninja
# Build and install
git clone https://github.com/lucocozz/argus.git
cd argus
meson setup builddir # -Dregex=true for regex support
meson compile -C builddir
sudo meson install -C builddir
Compiler: GCC 13.0+ (MSYS2/MinGW) or Clang 14+
Note: MSVC is not compatible due to non-standard extensions used
Package Managersâ
- vcpkg
- Meson
- XMake
# With Regex support (requires PCRE2)
vcpkg install argus[regex]
# Without Regex support (default)
vcpkg install argus
# Install as wrap dependency
meson wrap install argus
# With Regex support (requires PCRE2)
meson wrap install argus -Dregex=true
# Basic installation
xmake require argus
# With Regex support (requires PCRE2)
xmake require --extra="{configs={regex=true}}" argus
# XRepo alternative
xrepo install argus
xrepo install --configs="regex=true" argus
From Source (MinGW/MSYS2)â
# Install dependencies
pacman -S mingw-w64-x86_64-meson mingw-w64-x86_64-ninja mingw-w64-x86_64-gcc
# Build
git clone https://github.com/lucocozz/argus.git
cd argus
meson setup builddir # -Dregex=true for regex support
meson compile -C builddir
meson install -C builddir
Argus is not compatible with MSVC due to non-standard language extensions. Use GCC 13.0+ or Clang 14+ with MSYS2/MinGW.
System packages are not currently available. Use package managers or build from source.
// Dependenciesâ
Argus has minimal dependencies:
Dependency | Required | Purpose | Notes |
---|---|---|---|
PCRE2 âšī¸ | Optional | Regex validation | Enable with -Dregex=true |
Meson | Build only | Build system | Version 1.1.0+ required |
Ninja | Build only | Backend | Recommended for faster builds |
PCRE2 is automatically downloaded and built when regex support is enabled. No manual installation required!
// Configuration Optionsâ
When building from source, customize your installation:
- Basic Options
- Development
# Enable regex support (adds PCRE2 dependency)
meson setup builddir -Dregex=true
# Release build for production (default)
meson setup builddir
# Install to custom location
meson setup builddir --prefix=/opt/argus
# Enable tests and examples
meson setup builddir -Dtests=true -Dexamples=true
# Debug build with coverage
meson setup builddir --buildtype=debug -Db_coverage=true
// Verificationâ
Test your installation:
#include <argus.h>
#include <stdio.h>
ARGUS_OPTIONS(
options,
HELP_OPTION(),
)
int main(int argc, char **argv)
{
argus_t argus = argus_init(options, "test", "0.1.0");
int status = argus_parse(&argus, argc, argv);
if (status == ARGUS_SUCCESS)
printf("â
Argus is working!\n");
return 0;
}
# Compile and test
gcc test.c -o test -largus
./test --help
// Integrationâ
- CMake
- XMake
- Meson
- pkg-config
find_package(PkgConfig REQUIRED)
pkg_check_modules(ARGUS REQUIRED argus)
add_executable(myapp main.c)
target_link_libraries(myapp ${ARGUS_LIBRARIES})
target_include_directories(myapp PRIVATE ${ARGUS_INCLUDE_DIRS})
add_requires("argus >=0.1.0")
-- With regex support
add_requires("argus >=0.1.0", {configs = {regex = true}})
target("myapp")
set_kind("binary")
add_files("main.c")
add_packages("argus")
argus_project = subproject('argus', version: '>=0.1.0')
# With regex support
argus_project = subproject('argus', version: '>=0.1.0', default_options: ['regex=true'])
argus_dep = argus_project.get_variable('argus_dep')
executable('myapp', 'main.c',
dependencies: [argus_dep])
# Get compiler flags
pkg-config --cflags argus
# Get linker flags
pkg-config --libs argus
# Compile directly
gcc main.c $(pkg-config --cflags --libs argus) -o myapp
// Troubleshootingâ
Common Issuesâ
Library not found during linking
# Add library path
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
sudo ldconfig
# Or specify path explicitly
gcc main.c -L/usr/local/lib -largus -o myapp
Headers not found
# Add include path
gcc main.c -I/usr/local/include -largus -o myapp
# Check installation
find /usr -name "argus.h" 2>/dev/null
Compiler version error
# Check compiler version
gcc --version
clang --version
# Required: GCC 13.0+ or Clang 14+
# Update if needed or use MSYS2 on Windows
Platform-Specific Notesâ
Linux: Use package managers or build from source. Ensure GCC 13+ or Clang 14+.
macOS: Package managers provide the best experience. Ensure GCC 13+ or Clang 14+.
Windows: vcpkg recommended. MSVC not supported - use GCC 13+ via MSYS2/MinGW or Clang 14+.