Personal tools
You are here: Home Forum Extension of the platform How to call an externally executable program?

How to call an externally executable program?

Up to Extension of the platform

How to call an externally executable program?

Posted by yanchio at July 10. 2017

Hello,

 

I am on the Salome-platform to develop a new module by modifying the existing Atomic Module. Now most of my features have been completed, only the last step.

I created a new button in the toolbar:

int tbId = createTool( tr( "MEN_ATOMIC" ) );

 createTool( agRunMaxwell, tbId );

And link to:

LightApp_Operation* ATOMICGUI::createOperation( const int id ) const

{

  switch( id )

  {

….

  case agRunMaxwell:

    return new ATOMICGUI_RunMaxwellOp();

  default:

    return 0; 

  }

}

ATOMICGUI_RunMaxwellOp.cxx

void ATOMICGUI_RunMaxwellOp::startOperation()

{

fork();

  execl("/home/yanchio/Documents/MotherAdd/txtex","txtex",NULL); 

}
I want to implement a function when i press button and then call my txtex, which is an external executable that I have compiled to complete.
 
I can compile the ATOMIC module, but when I execute the following error occurred:

[xcb] Unknown sequence number while processing queue

[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called

[xcb] Aborting, sorry about that.

SALOME_Session_Server: ../../src/xcb_io.c:274: poll_for_event: Assertion `!xcb_xlib_threads_sequence_lost' failed.

/nactionId=4/n/nactionId=4/n

I am a linux novice, maybe my question is more stupid, if you can answer, I will be grateful!
 

Re: How to call an externally executable program?

Posted by yanchio at July 10. 2017

My OS is Ubuntu 14.04 LTS

Salome Version is 7.8.0

Powered by Ploneboard
Document Actions