Using c-kernel#

Note

Under construction

Adding options in magic comments#

The following options can be specified in a //% magic comment within a code cell:

Option

Meaning

Example

CC

set the C compiler

CC clang

CXX

set the C++ compiler

CXX clang++

CFLAGS

add C compilation flags

CFLAGS -Wall

CXXFLAGS

add C++ compilation flags

CXXFLAGS -std=c++17

LDFLAGS

add linker flags

LDFLAGS -lm

DEPENDS

add .o dependencies, separated by spaces

DEPENDS mycode.o

VERBOSE

extra output from the kernel

ARGS

command-line arguments to the executable

ARGS arg1 arg2 etc

NOCOMPILE

save and don’t compile the code cell

NOEXEC

save and compile, but don’t execute the code cell