Apologize not real Nim but can't help find to know What C directive's meaning:
# dynlib
# cdecl
in two-third page down of tutor https://gist.github.com/zacharycarter/846869eb3423e20af04dea226b65c18f
Please explain clearly and informatively
dynlib tells Nim, hey use this DLL. cdecl call this proc in this special way usually because its a C function from a DLL.
Not really. c2nim allows you to pass pragmas on to the Nim code, but both cdecl and dynlib are perfectly valid Nim pragmas that are used for binding with C.
dynlib has a bit of a dual purpose, depending on if the procedure is being imported or exported from or to a dynamic library. The documentation for it can be found here: https://nim-lang.org/docs/manual.html#foreign-function-interface-dynlib-pragma-for-import (scroll down for the export part). In essence when importing from a dynamic library it tells Nim which dynamic library it should try and load the procedure from, and for exporting it tells Nim that this should be made available in the exported DLL (when using --app:lib. This only really changes things on Windows, as on Linux everything is exported by default).
cdecl deals with calling conventions. Since procedures are a high-level concept in terms of the instructions actually handed to the CPU there has to exist a "contract" between procedures on how to call each other. This typically deals with allocating a return value on the stack, backing up register values we might need, saving the point in the list of instructions that should be jumped to once the procedure is done etc. There exists various such "contracts" named calling conventions. cdecl just means that it should use the same calling convention as whatever the C code uses. The documentation for the various calling conventions and their related Nim pragmas can be found here: https://nim-lang.org/docs/manual.html#types-procedural-type