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
0
votes
1answer
76 views

cannot launch the Visual Studio C++ Mathematica program on debug mode, only on release mode!

Edited I am trying to run a C++ program on Visual Studio. this program needs to connect to mathematica kernel. assume any simple program, no matters. something like this code. I added and linked ...
1
vote
1answer
87 views

Run a code in Fortran, C++, or Python in Wolfram Mathematica 12 on Mac OS [closed]

I would like to run an external code, written in Fortran, C++, or Python, within Wolfram Mathematica 12 on my MAC OS. I looked up on Internet and I tried to read the WSTP documentation on Wolfram ...
1
vote
1answer
62 views

WSTP connection does not connect on windows

I am new in mathematica programming. Actually referring this link, I tried to connect to kernel from c++ program on Windows with visual studio. I copied all these .exe files in related folder which i ...
2
votes
1answer
52 views

error LNK2019: unresolved external symbol _WSInitialize

I tried to run very simple example of connecting to WSTP. I checked a few links in this site but none of them could resolved my issue. I added three .lib files to visual studio location from this link ...
1
vote
0answers
32 views

Substitute for MathLink to integrate PARI with Mathematica?

How does one access MathLink with current version of Mathematica? I'm trying to integrate the "computer algebra system" PARI with Mathematica, as documented at https://pari.math.u-bordeaux....
2
votes
0answers
60 views

Update Matrix entry from Java

I found the following example online (which works fine) for sending commands from Java: ...
3
votes
1answer
76 views

IMO WSTP does not work with the Visual Studio 2019 tools, can you prove otherwise?

Can LINK addtwo.obj addtwotm.obj wstp64i4.lib /OUT:addtwo.exe actually work with Visual Studio 2019 tools, if so how? ...
2
votes
2answers
141 views

Where to place the essential WSTP files in Visual Studio 2019?

I have Visual Studio for C installed in : C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC From https://reference.wolfram.com/language/tutorial/WSTPDeveloperGuide-Windows.html : "...
2
votes
2answers
129 views

LinkOpen::linke: Specified file is not a MathLink executable. in AceGen

I tried to run AceGen/AceFEM on my Mac(10.15.5). I installed Mathematica (12.1.0.0) successfully and also the latest version of the AcePackage (7.113). The installation of the AcePackage is successful,...
3
votes
1answer
144 views

How to get information from all built-in Mathematica functions in order to create a Kotlin library like the Wolfram Client Library for Python?

I'd like to use (if this already exists) or create a library to use Mathematica together with Kotlin (or Java) (not JLink, please see below). We already have this very useful implementation for ...
2
votes
1answer
50 views

What is the use of explicitly calling EvaluatePacket?

I noticed that many examples of C code for communicating via MathLink with the Mathematica kernel first pass an EvaluatePacket call to Mathematica, like this: ...
5
votes
1answer
61 views

ProgressIndicator during a WSTP C function

My WSTP package includes some C++ calculations which can take a long time. I'd therefore like to display a ProgressIndicator during this calculation, the progress ...
0
votes
1answer
37 views

Create error Message with runtime value

I've written a Mathematica package (see here) which uses WSTP to call a C/C++ library. Some possible user-errors are known by the package and can be detected and reported by the front-end package code....
3
votes
1answer
148 views

Callable interface

I have a c++ program that generates large numbers of small graphs (millions). I would like to remove graphs that are isomorphic to each other so I am thinking about trying to use the callable ...
1
vote
0answers
182 views

How to get physical memory addresses out of WSTP?

Appologies this is a very stupid question since I am learning c and wstp's input outputs. Suppose I have a template file as follows: ...
1
vote
0answers
149 views

What is the best setup for creating WSTP Programs?

I am relearning C++ so I can create C++ programs and run them inside Wolfram Language. I am installing the environment for writing C++. Can someone suggest the best and minimalist one which works best ...
5
votes
1answer
127 views

Passing an image to Kernel via NETLink

I have created a specialized image analysis method in Mathematica that takes an image and returns a marked up image with some detection output. In order to allow others to feed images into my ...
5
votes
1answer
144 views

Can I distribute Wolfram.NETLink.dll with an open-source project?

I am developing an open-source suite of Windows Workflow Foundation activities for the Wolfram Language to use with UiPath, a Windows automation platform. I built it using the Wolfram.NETLink library. ...
7
votes
0answers
226 views

How to call the Wolfram Engine from swift?

I'd like to call the Wolfram Engine within a swift project in Xcode. Are there any known methods or available resources on how to do this? I'm hoping to include it as a resource library for use inside ...
2
votes
2answers
220 views

How to detect when the evaluation queue is empty?

Mathematica provides $Post, whose value, if set, is applied to every output expression. In particular, if one sets ...
1
vote
0answers
159 views

Can we link Mathematica and Fortran with WSTP? [closed]

How to link Mathematica and Fortran with WSTP?
4
votes
1answer
64 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 ...
5
votes
1answer
81 views

MathLink: How do I send a bigint?

Suppose I have a big integer from some library such as GMP. I need to return this from a LibraryLink function. What is the most efficient way to do it? The simplest way is to convert it to a string <...
1
vote
0answers
77 views

Using WSTP to connect a C process to local and remote kernels simultaneously [closed]

Is it possible for a C program to communicate (via WSTP) with both a Mathematica kernel running on its machine, and a remote one? For context: I use a local Mathematica kernel which talks to a remote ...
6
votes
1answer
162 views

MathLink: How to change the default listening IP address?

I have multiple VPNs, one gives local IP address 10.8.0.6 and another is 10.2.3.2. Now I wish to access machines in 10.2.3.x but Mathematica listens in 10.8.0.6 which is not known for those machines. ...
3
votes
0answers
74 views

Unknown Math error while creating a WSTP link

When I was executing this code link = LinkCreate[LinkProtocol -> "TCPIP"] I was getting the response as "LinkOpen::linke: Unknown MathLink problem ...
3
votes
0answers
101 views

WSTP HTTP interface

Wolfram's website mentions a "one-way" HTTP WSTP interface (https://www.wolfram.com/wstp/ ) One-way connection to the Wolfram Language is supported through HTTP in many languages, including PHP, ...
1
vote
0answers
141 views

WSTP with an MPI application

I'm looking to use WSTP to make functions defined in a C MPI application available to a remote Mathematica kernel. I've got this working for a non-MPI version of the application, but now wish to have ...
1
vote
0answers
19 views

WSWaitForNewLinkFromLinkServer waits too long

Here's a snippet of C++ code: ...
2
votes
0answers
143 views

WSTP server with asynchronous callback in pure Wolfram Language

In this question, @Todd Gayley provided a nice snippet for WSTP server. ...
1
vote
0answers
294 views

“LinkConnect::linkc: — Message text not found” on startup, removing ~/.Mathematica helps

We have a university license of Mathematica. In /usr/remote/Wolfram/Mathematica/10.3/Configuration/Licensing/mathpass on all the Debian 9 systems we have the ...
1
vote
0answers
63 views

How can I launch GenerateDocument with a template file on multiple kernels in a batch fashion?

I am trying to do automated testing of my MMA package by launching test cases that are generated on-the-fly with GenerateDocument and a template document, and then evaluated with NotebookEvaluate. I ...
5
votes
1answer
457 views

Error LNK2019: unresolved external symbol WSEvaluate referenced in function

In the compile process of a C function written by using wstp.h library (Mathematica 11.3), an error (...
3
votes
0answers
66 views

How to use both WSTP and MathLink libraries? [duplicate]

We are in the process of writing a Mathematica library by using C language and WSTP library. We encountered a lot of problems like sending a message from C to Mathematica, implementing an argument ...
1
vote
1answer
47 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. ...
1
vote
1answer
90 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 ...
5
votes
1answer
134 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? ...
1
vote
0answers
57 views

How does the mainloop know how to respond to a given packet?

In the MathLink / WTSP mainloop different packets get passed to a kernel in "MathLink mode" and the kernel has a specific response for each. I can guess how the kernel picks a response, generally, but ...
8
votes
1answer
176 views

How to send packed array from math kernel to 3rd party app via WSTP

Background I'm developing a small python wrapper PyWSTP. The wrapper is still in very early stage and lacking features. One important feature I'm considering is transferring dense array between math ...
3
votes
0answers
76 views

WSGetUTF8Function missing in WSTP DLL

Bug introduced in 10.0 and persisting through 11.3.0 Note: MLGetUTF8Function is new in 10.0 (ML interface 4). Despite being in docs and ...
2
votes
0answers
60 views

Publishing the result of a research related to development of Mathematica [closed]

We are developing a library in c language by using WSTP for Mathematica. Do you know a journal for publishing our results?
3
votes
1answer
122 views

How return an object of a struct from c to Mathematica?

I'm writing a c code by using WSTP library. In my c codes, I have a struct named Person, and I have a function named Foo, which returns an object of Person. ...
8
votes
2answers
369 views

Control a Mathematica kernel from the front-end and from python

I'd like to be able to start and control a Mathematica kernel/front-end from python and be able to evaluate things in a notebook and query results on the python side too. Is this possible?
2
votes
0answers
56 views

connecting to an existing application's C API from Mathematica

I have a general question about accessing the contents of an existing application's C API (https://libfive.com/) from Mathematica. Can it be done, and some hints on how? I am about to embark on ...
7
votes
1answer
157 views

Bug in Mathematica 11.2 WSTP onwards - wstp.h defines only MLEvaluateString?

Bug introduced in 11.2 and persisting through 11.3 I maintain a C++ library with a WSTP interface to Mathematica. Some of my users have noticed that in Mathematica versions 11.2 and 11.3, they see a ...
5
votes
1answer
176 views

Current QuantLib implementation for Mac OS

Does anyone know of a current QuantLib implementation that can run on Mathematica version 10.3.0 (or higher) for Mac OS X x86 (64-bit)? About QuantLib: The QuantLib project is aimed at providing ...
3
votes
1answer
73 views

Why some Graphics cannot be captured by MathLink in NETLink?

I'm trying test on calling mathematica function from .NET application by running demo application MathKernelApp.exe which could be located at ...
13
votes
2answers
467 views

Link server WSTP API feature not receiving incoming connections

I'd like to apologize ahead of time that this may be a very long post but want to get all of this out there. Also, this post really only pertains to those with WSTP/MathLink experience. My problem ...
6
votes
1answer
117 views

Hide WSTP application from taskbar

I just updated a small MathLink program that I made a while ago, and recompiled it using the new WSTP system (Mathematica 11.2). ...
1
vote
1answer
111 views

Missing _MLDisownDoubleArray from libMLi4.a building MathLink with MEX

I'm trying to build MathLink on a Mac using Mex, according to the instructions included in the MathLink download. Unfortunately, when I compile ...

1
2 3 4 5