Dear Elisa,
Unfortunately, SAMSON Elements cannot contain any GPL code. The reason is that SAMSON Elements are dynamically loaded at runtime and tightly integrated with SAMSON and with each other. According to the GPL FAQ (https://www.gnu.org/licenses/gpl-faq.en.html#GPLPlugins) :
If the main program dynamically links plug-ins, and they make function calls to each other and share data structures, we believe they form a single combined program, which must be treated as an extension of both the main program and the plug-ins. If the main program dynamically links plug-ins, but the communication between them is limited to invoking the ‘main’ function of the plug-in with some options and waiting for it to return, that is a borderline case.
Since SAMSON is not open source (we believe developers of SAMSON and SAMSON Elements should be free to choose whether they distribute their source or not), GPL code cannot be used in SAMSON Elements (and is not used in SAMSON either).
If you want to distribute your source code (as we do for some of our own SAMSON Elements and tutorials: https://github.com/1A-OneAngstrom), you should choose a license that is compatible with this hybrid approach (i.e. mixing closed and open source). This includes Apache, MIT, LGPL, and BSD for example. For our open source code, we have used BSD-3.
Note that it is possible to write SAMSON Elements that perform calls to external executables, even if these external executables are based on GPL code. However, these GPL-based external executables should be installed separately by users.
I hope this clarifies things,
Best regards,
Stephane