范文 |
Linux下通过C++调用C#程序,具体代码如下: #include<errno.h> #include<stdio.h> #include<stdlib.h> #include<unistd.h> #include<sys/types.h> int main(int arg,char **args) { int ret=0; if(fork()==0){ ret=execlp("mono","mono","/home/liuwenhui/bin/GlobalTimes.InterruptWork.exe","B26A2F1A32904FFE967026AE744904A0",NULL); if(ret < 0){ perror("Err on execlp mono"); exit(errno); } } return 0; } |