Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7033065
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:00:52+00:00 2026-05-28T01:00:52+00:00

I have a C++ (technically MATLAB mex) program, which I am planning to use

  • 0

I have a C++ (technically MATLAB mex) program, which I am planning to use to launch a stand-alone pure C++ slave program on my system. The master calling program may look something like the following:

void mexFunction(int nlhs,mxArray *plhs[],int nrhs,const mxArray *prhs[]){
    system ("path/to/slave/program");
}

Once the slave is launched, I would then like to have a second mex program which will communicate with and send data to the slave program. The data sent will be in the form of large-ish C++ arrays.

I imagine that I will need some kind of handle to the slave program (perhaps its pid?), a method for sending messages and presuamably a way for the slave program to listen out for incoming messages.

I have no experience in getting separate C++ programs to communicate with each other, so any hints in this area would be appreciated. In addition, if there are any specific MATLAB mex-specific caveats, I would be interested to hear about these.


EDIT: I should have mentioned that I am building this on Ubuntu, but will ultimately like it to work on all platforms. Platform specific advice very welcome, but multi-platform ideas are really what I’m after.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T01:00:53+00:00Added an answer on May 28, 2026 at 1:00 am

    You are looking for an IPC (Interprocess Communication) mechanism.

    Boost has an entire chapter on this and is a cross-platform solution.

    Boost.Interprocess has been tested in the following compilers/platforms:

    Visual 7.1 Windows XP
    Visual 8.0 Windows XP
    GCC 4.1.1 MinGW
    GCC 3.4.4 Cygwin
    Intel 9.1 Windows XP
    GCC 4.1.2 Linux
    GCC 3.4.3 Solaris 11
    GCC 4.0 MacOs 10.4.1
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Languages like C and even C# (which technically doesn't have a preprocessor) allow you
I have a JS script (widget) which is added to other websites. Technically its
I have two options (which technically are the same, as I understand) to declare
I have a system of stochastic differential equations implemented in MATLAB. Just 4 variables
I have a Rails 3.0 app (technically 3.0.7) which I would like to upgrade
I'm technically savvy but don't have extensive experience with servers/daemons (I'm a Windows guy,
I have read that private variables in a base class are technically inherited by
I have a script which will be run interactively by non-technical users. The script
I have a view in the UI that is technically an extended ImageView inside
Although I have a feeling that this isn't technically possible, it's worth asking anyways.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.