Skip to contents

The demos of the rdyncall package (see demo(package = "rdyncall")) exercise direct calls, callbacks, generated DynPort packages and a few real shared libraries.

Some demos only use the R runtime or the platform C runtime. Others require external shared libraries to be installed and discoverable by dynfind.

Current demos

DemoRequired external libraryNotes
sqrtC math libraryUsually provided by the operating system
factorialnoneCalls an R callback through a C function pointer
callbacksnoneCallback examples
qsortC runtimeUses the platform qsort()
stdioC runtimeUses platform standard I/O functions
R_ShowMessageR shared libraryUses the loaded R runtime
glpkGLPKSolves a small linear program
libxml2libxml2Parses a small XML document
SDLSDL3Opens an SDL3 window for the snake demo
SDL_audioSDL3Opens an SDL3 audio/window demo
SDL_rasterSDL3 and OpenGLOpens an SDL3/OpenGL raster demo
raylibraylibOpens a raylib window; can use RAYLIB_LIB

Library discovery

Place shared libraries in a standard system location or update the platform library search path so that dynfind can locate them. On Windows this usually means PATH; on Unix-like systems it can mean the dynamic linker search path or a package-manager library directory.

Several demos also honor explicit environment variables:

  • SDL3_LIB: path to an SDL3 shared library.

  • OPENGL_LIB: path to an OpenGL shared library.

  • RAYLIB_LIB: path to a raylib shared library.

  • RDYNCALL_RAYLIB_CACHE: cache directory used by the raylib demo when it downloads a release asset.

Installation hints

Install the development/runtime package names used by your operating system or package manager. Common examples are:

PlatformExamples
macOS with Homebrewbrew install glpk libxml2 sdl3 raylib
Debian/Ubuntuapt install libglpk40 libxml2 libsdl3-0 libgl1 libglu1-mesa
Fedoradnf install glpk libxml2 SDL3 mesa-libGL mesa-libGLU
WindowsInstall matching DLLs with MSYS2, Scoop, vcpkg or another package manager and put them on PATH

The raylib demo can use a locally installed raylib through RAYLIB_LIB. If RAYLIB_LIB is not set, it attempts to obtain a matching release asset from the raylib GitHub releases and cache it locally.

See also