Code is also available in this GitHub repository:
https://github.com/arnoudbuzing/wolfram-librarylink-examples
A possible answer here:
https://mathematica.stackexchange.com/questions/31545/returning-multiple-results-from-a-librarylink-function
With a mirror post here:
https://community.wolfram.com/groups/-/m/t/111925
Not sure how to do this off-hand, but I will ask some people who might know.
Another good place to look for a possible answer is the Q&A site called StackExchange:
https://mathematica.stackexchange.com/search?q=LibraryLink
Hello Arnoud,
thanks for these very helpful examples. Unfortunately, there is a case missing:
I would like to pass several MTensors as a result via LibraryLink.
Say, I have a real matrix and a list of integers that I want to pass on.
Thanks, Michael