A
A
Arti-Jack2018-05-13 11:57:15
bash
Arti-Jack, 2018-05-13 11:57:15

How to make a call to another application from C++?

I have a function that should open another application - wxMaxima. The maxim itself is installed for me and if you open this file, then everything works there (I open the file with the wxmx extension through wxMaxima itself).
So, what does the function look like:

// Рендеринг графика с помощью wmxMaxima
void maximaRender(int N, float *time, float *input, float *output) {
    createAbstractFile(N, time, "Time.txt");
    createAbstractFile(N, input, "Input.txt");
    createAbstractFile(N, output, "Output.txt");

    // Открытие графиков через wmxMaxima
    system("/home/user/CLionProjects/testproj/Test.wxmx");
}

The Test.wxmx file uses data in files that I programmatically create and populate accordingly. But when I compile, I get the following:
Syntax error: newline unexpected
And the status 2( 2 exit status) is also returned.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vitaly, 2018-05-13
@vt4a2h

Well, you did not specify how to open the file. Write on the command line what you wrote to system and look at the result.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question