O'Reilly logo

Mathematica Data Analysis by Sergiy Suchok

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Interface implementation with a program in С/С++

Let's consider how a C program should be prepared in order to make the WSTP protocol interaction available.

Firstly, as mentioned in the previous chapter, you need to prepare a special tm file that will describe all the data that will interact with Mathematica.

Secondly, the source code written in C should include the standard WSTP header file:

#include "wstp.h"

Note

This file is located in the C:\Program Files\Wolfram Research\Mathematica\10.1\SystemFiles\Links\WSTP\DeveloperKit\Windows-x86-64\CompilerAdditions\mldev64\include folder.

This file defines the following types:

WSLINK

A WSTP link object (analogous to LinkObject in the Wolfram Language)

WSMARK

A mark in a WSTP stream

WSENV

The WSTP library ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required