Suppose there is a program that, depending on the Linux / Windows system, should run the executable file. Does the standard library have a solution to this problem, except by using system() ? Or if there is no function suitable for both OSs, is there a way to make the call to the .exe file without using system / winapi, something like Process.Start in c #?
ps
if there is no solution in the standard library, I will be very grateful to other answers
|
Process.Start в c#uses something else from winapi. And in fact, how do you imagine it? Binary compiled under what platiform? who should run something there? or is it meant to work on another OS from under the emulator? - NewViewProcess.Start, probably, yes. I do not really imagine this at the moment, so the question was asked to find out if there was any way. x86-64. - Lex Marchenkoexec*linux.die.net/man/3/execl functions , so use them, then under win then collectmingw. Compatibility in behavior in practice is not 100%, the lack offork()affects the wines platform .. - NewView