Quantcast
Channel: Chilkat Forum - latest questions
Viewing all articles
Browse latest Browse all 1061

How to run compiled program using chilkat

$
0
0

My aim is to make "cd /mydirpath" and run my program which was compiled before: "./a.out" Here is how I'm trying to make it:

const char *cmd1 = "cd /home/machinekit/projects";

char *cmd2 = "./a.out";

success = ssh.SendReqExec(channelNum, cmd1);    if (success != true) {      std::cout << ssh.lastErrorText() << "\r\n";         return;     }

    success = ssh.SendReqExec(channelNum, cmd2);    if (success != true) {      std::cout << ssh.lastErrorText() << "\r\n";         return;     }

The first command didn't return an error though the second one gives:

ChilkatLog: SendReqExec: DllDate: May 25 2017 ChilkatVersion: 9.5.0.68 UnlockPrefix: Anything for 30-day trial Architecture: Little Endian; 64-bit Language: Visual C++ 2017 / x64 VerboseLogging: 0 sendReqExec: command: a.out reqExecCharset: ANSI channel: 100 commandQP: a.out Unexpected message type received in response to exec request. messageType: 96 --sendReqExec Failed. --SendReqExec --ChilkatLog


Viewing all articles
Browse latest Browse all 1061

Trending Articles