The tag has no usage guidance.

learn more… | top users | synonyms

3
votes
2answers
111 views

What is the best way to work with complex number array in librarylink function in terms of C++ and Eigen?

I want to use C++ Eigen library in Mathematica Librarylink function. Currently, I have no problem dealing with real arrays. But I don't know what is the best way to deal with complex array in ...
5
votes
1answer
97 views

Initializing and keeping track of a large c++ object and reusing it from inside Mathematica

I have a c++ library function that calculates a distance between two vectors given an underlying matrix. ...
1
vote
0answers
61 views

How to simplify writing MathLink code? [closed]

This wonderful question inspired me to ask the analogue for MathLink, which is now known as Wolfram Symbolic Transfer Protocol (WSTP). The basic example addTwo is over complicated and under useful.
2
votes
1answer
47 views

Discard an entire (sub)expression on a MathLink link

Suppose that an expression like f[something, 12] was sent to a MathLink link, and we need to read off only the second part of ...
0
votes
1answer
109 views

Convert code from C++ to Mathematica [closed]

I need to know how to convert the following code in C++ to Mathematica. ...
2
votes
0answers
38 views

Importing binary structured C++ data file

I am trying to import a binary data file. It seems that BinaryReadList would be appropriate? However the data file is composed of c++ structures like this: ...
7
votes
0answers
99 views

What is the best way to transfer arbitrary-precision reals using WSTP?

I'm developing a Mathematica package, inside of which there is a number-crunching function. It uses a list of arbitrary-precision numbers as input and it takes a lot of time to do its job. So I've ...
6
votes
0answers
72 views

How can I wrap a C++ object in WSTP?

I am trying to wrap a sophisticated C/C++ API in Mathematica using WSTP, but can't work out how to return a pointer to a C/C++ data structure. This object was created on the C/C++ side of the wrapper, ...
0
votes
0answers
61 views

Linking to C++ files [duplicate]

I have written mathematica file that does manipulations on a certain set of points. I would like to access code that someone else has written for a least square fit in C++. How do I access this C++ ...
0
votes
1answer
256 views

Random numbers in C++ and Mathematica gives wrong results? [closed]

I have the following strange phenomenon which puzzles me!: I have a piecewise constant probability density given as ...
3
votes
1answer
121 views

Handling error in WSTP program C/C++

I have a program, written in C++, which uses WSTP to communicate with Mathematica 10 (i.e., linked using Install["name_program"]). How should my code report an ...
0
votes
1answer
3k views

Error message LNK2019, unresolved external symbol _output referenced in function __tr0

I've successfully compiled the simple addtwo function predefined in Mathematica as per: MathLink dependencies: "LNK2019: unresolved external symbol _MLMain" I am now attempting to write an ...
1
vote
1answer
118 views

Hide MathKernel Tab on Taskbar when using C++ [duplicate]

I am connecting to MathKernel.exe using C++ via MathLink on Windows. Hence, to create the link, this is what I use: ...
1
vote
1answer
180 views

Read expression from Mathematica via Mathlink C++

This is a simple C++ program to send an expression to the_Mathematica_ Kernel and get its response. ...
1
vote
1answer
70 views

MLEvaluate() Function Gives Error

I am trying to link my C++ program to Mathematica Kernel. I am trying to use the MLEvaluate() evaluate but I receive an error while compilation. My codes are as below: ...
0
votes
0answers
51 views

Compiling Visual Studio C++ to Run on Computers without Mathematica [duplicate]

I have written a console application on Visual Studio C++ as below ...
2
votes
1answer
455 views

Creating a C++ project with Visual Studio 2010

I am trying to create a GUI using Microsoft Visual Studio C++ 2010 by calling Mathematica in my codes. I have done everything step by step as mentioned here Then I wrote this code as mentioned in ...
18
votes
1answer
783 views

Calling Mathematica from Visual Studio - example

I am trying to set up a connection between Visual Studio 10 and Mathematica 8.0 on a Windows system. I found several sources of information on the Wolfram website, but I get entirely lost. Most of the ...
0
votes
1answer
229 views

Making a C++ callable .lib or .dll file from a Mathematica notebook [duplicate]

MATLAB supports conversions of their function files into C++ callable libraries. I was wondering if the same feature is also available in Mathemathica? If yes, can you please guide me where I can ...
5
votes
2answers
570 views

How to convert data types in a LibraryLink wrapper

I have a dynamic library which I want to load into Mathematica using LibraryLink. I don't have access to the source code of the library, so I need a C wrapper to do the job. In the C wrapper, I would ...
2
votes
1answer
199 views

Executing C programs within mathematica [duplicate]

I have a requirement for executing a C program within Mathematica. The user will provide the inputs and the expected results on a front end. Mathematica runs the C file, obtains the result for the ...
0
votes
1answer
612 views

using Mathematica's matrix multiplication in C++

Is there any way that I can utilize Mathematica's matrix multiplication in a C++ program? I'm making a 3D graphics engine (for class) in C++ and I would really like to use Mathematica for all of my ...
9
votes
2answers
451 views

MathLink and C++ vector container

The Problem. I have a C++ class that does some computations, and returns a C++ vector object (the length of which can possibly vary with each run). I want to store each of these vectors as a list in ...