'How do I save Mathematica parameters and later access them with C++?

At the moment, I call a C++ function from a dynamic library in Mathematica with given arguments/parameters. These include strings, integers, sparse matrices etc.

output = dllfunction[string, int, int, SparseMatrix, outputLocation,...];

Within the dynamic library, the arguments are loaded using <WolframLibrary.h>. Now I want to separate the Mathematica part from the C++ part.

How do I save the Mathematica parameters so I can load them in a separate C++ executable using <WolframLibrary.h>?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source