Message Boards Message Boards

4 Replies
11 Total Likes
View groups...
Share this post:

List of LibraryLink examples

Posted 11 years ago
This is a list of a fully functional LibraryLink examples, starting with the bare minimum to more complicated cases:
  1. Doing nothing with LibraryLink -- Explains how to write a minimal example in LibraryLink that takes no arguments and returns nothing
  2. Saying hello with LibraryLink -- Explains how to return a value from a LibraryLink function
  3. Sending greetings from LibraryLink -- Explains how to pass in a value to a LibraryLink function
  4. Squaring integers with LibraryLink -- Explains how to write a basic arithmetic function with LibraryLink
  5. Writing a boolean function with LibraryLink -- Explains how to write a function that returns True or False
  6. Calculating the mean value of a list with LibraryLink -- Explains how to pass lists for a LibraryLink function
  7. Creating a matrix with LibraryLink -- Explains how to return a matrix from a LibraryLink function
  8. Working with complex numbers in LibraryLink 
  9. Working with multiple functions in LibraryLink 
LibraryLink examples which use WolframLink:
  1. Hello World revisited using WolframLink in LibraryLink
  2. Working with a variable number of arguments in LibraryLink
POSTED BY: Arnoud Buzing
4 Replies

Code is also available in this GitHub repository:

POSTED BY: Arnoud Buzing

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:

POSTED BY: Arnoud Buzing

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

POSTED BY: Michael Jasi
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract