Extending the language / C-Extensions |
When creating a 42r program or 42x library, the linker needs to resolve all function names, including C-Extension functions.
If extension modules are not specified explicitly in the source files with the IMPORT directive, you must give the extension modules with the -e option in the command line:
fgllink -e myext1,myext2,myext3 -o myprog.42r moduleA.42m moduleB.42m ...
The -e option of fgllink does not write C-Extension references into the .42r file. If you use the -e argument with the fgllink command, you must also use the -e argument with the fglrun command, in order to load the libraries at runtime.
The -e option is not needed when using the default userextension module, or if C-Extensions are specified with the IMPORT directive.