Skip to content

Smart Copy

Marcelo Fornet edited this page May 23, 2020 · 2 revisions

Online judges require that users upload single, self-contained source code files, that only rely on the standard library of each language by default. This is an obstacle to use custom libraries. However, some tools have been created to build a single, self-contained file. For c++ we have caide-cpp-inliner.

To use this feature, modify acmx.configuration.copyToClipboardCommand to be a command which on execution should write on the standard output, the submission source code. To use it run from the command palette ACMX: Copy Submission, this will execute copyToClipboardCommand, and will put the output in the clipboard.

Example

caide-docker is a wrapper for caide-cpp-inliner which build a c++ submission given the source code, and the local library used. To use this tool to generate the submission set in the settings:

acmx.configuration.copyToClipboardCommand = caide-docker $CODE -l /path/to/library -p

Read documentation about caide-docker to see how to install it globally.

After this is added, we can include our library in our main solution, and before submitting, copying submission using smart copier.