Linking

bind

Although GHDL’s elaborate command can compile and link C sources, it is sometimes preferred or required to call a compiler explicitly with custom arguments. This is useful, e.g., when a simulation is to be embedded in the build of an existing C/C++ application.

This example is equivalent to basic, but it shows how to use --bind and --list-link instead of -e. See Linking object files for further details.

Hint

Objects generated by --bind are created in the working directory. See GCC/LLVM only commands and ghdl#781.