Questions tagged [mathlink-or-wstp]

MathLink is a suite of Mathematica functions that implement a protocol for the communication/interfacing of Mathematica with external programs.

Filter by
Sorted by
Tagged with
5 votes
0 answers
103 views

How to implement LinkLaunch-like functionality with timeout?

tl;dr: What is the best way (and correct sequence of operations) to connect two programs using MathLink while anticipating failures / timeouts? Launch program and connect, with timeout I have a ...
Szabolcs's user avatar
  • 235k
5 votes
1 answer
178 views

How I can implement an argument which is an array of string by using WSTP library?

I have a c function named Func. Its argument is an array of strings. How I can implement this function by using WSTP library? ...
H.H's user avatar
  • 327
4 votes
1 answer
71 views

MathLink: What is the difference between MLPutNext and MLPutType?

What is the difference between MLPutNext and MLPutType (also called WSPutNext and WSPutType)? Their documentation is virtually ...
Szabolcs's user avatar
  • 235k
4 votes
2 answers
646 views

Cannot call custom function loaded from script using C/C++ MathLink

I am using MathLink with C/C++ on a Unix system in order to call a Mathematica (version 9) function and get the result. The function I need to call is a personal function of mine ...
Andry's user avatar
  • 421
3 votes
2 answers
710 views

WSTP: Problems encountered while compiling using mcc

I am trying to follow this documentation: https://reference.wolfram.com/language/tutorial/SettingUpExternalFunctionsToBeCalledFromTheWolframLanguage.html When I ...
sra's user avatar
  • 717
3 votes
1 answer
1k views

MathLink compile errors

Don't you just love it when your computer is working fine, you work with some good examples, everything is wonderful and your relationship with your computer is the best? I do. But what happens when ...
jmlopez's user avatar
  • 6,480
3 votes
2 answers
623 views

MathLink and CDF

So far I have read that some things are not supported in CDFs. Istvan-zachar mentioned very useful things in his post. Unfortunately he mentioned that MathLink operations, including J/Link and .NET/...
jmlopez's user avatar
  • 6,480
3 votes
2 answers
437 views

WSTP hangs up in Mathematica 10.2

I have a problem with WSTP in the newest version of Mathematica. I get the same problem on Ubuntu 14.04 and Mint 17.2. Using the pre-built examples (...
kacper's user avatar
  • 31
3 votes
1 answer
529 views

Install[] of working WSTP executable hangs, Mathematica 10.1, linux

I am trying to use WSTP to link to the addtwo.c function example that comes with Mathematica. I have compiled addtwo successfully (took an effort) and if I run it in the command line I can connect it ...
tortortor's user avatar
  • 325
3 votes
0 answers
316 views

Generating Mathlink executables by CCompilerDriver

I'm trying to generate a MathLink executable by CCompilerDriver package. The MathLink ...
hxiao's user avatar
  • 887
3 votes
2 answers
267 views

Portable makefile for wscc builds

What's the canonical way to write a portable makefile for wscc programs? The makefile typically requires the location of the wscc...
innisfree's user avatar
  • 325
3 votes
1 answer
139 views

How to wait until a Listen mode link gets connected to?

Suppose we create a link like this: link = LinkCreate["mylink", LinkMode -> Listen] How can we wait until this link gets connected to by another process, and ...
Szabolcs's user avatar
  • 235k
2 votes
1 answer
536 views

Cannot launch MathLink from C

I am trying to launch a MathLink from a 64bit C dll that I am building, using the following code: ...
mjayvizzle's user avatar
2 votes
1 answer
487 views

MathLink dependencies: "LNK2019: unresolved external symbol _MLMain"

I am trying to compile the MathLink examples included with Mathematica. I am careful to ensure that the libraries are present in the Visual Studio folder as indicated by the installation manual. I am ...
Onias's user avatar
  • 21
1 vote
2 answers
424 views

MathLink Graphical Output (Plots) to File

In a custom Mathematica frontend based on MathLink I try to make use of plots produced in Notebooks. The idea is to write them to files whenever they get produced. According to C-code snippets I ...
highsciguy's user avatar
  • 1,700
1 vote
0 answers
140 views

Set form of all output to InputForm

I try to interact with mathematica using MathLink for symbolic computations. By default it returns strings such as 2\012-1 + E\012-------\012 3\012 E if the ...
highsciguy's user avatar
  • 1,700
1 vote
1 answer
55 views

Send an error message from a c function by using WSTP library

Consider that Func is a function written in c language by using WSTP library. In some situations, it can return an error to Mathematica. ...
H.H's user avatar
  • 327
1 vote
1 answer
111 views

Return two arrays from a c function by using WSTP library to Mathematica in a special manner

I have two arrays. The first one is an array of integers, and the second one is an array of doubles. I want to write a c function to return these arrays by using WSTP library to Mathematica. I know ...
H.H's user avatar
  • 327

1
2