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

  • 3
    usingfree boost.process - VTT
  • You might think that 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? - NewView
  • @NewView, regarding Process.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 Marchenko
  • one
    In this case, there are linux-compatible exec* linux.die.net/man/3/execl functions , so use them, then under win then collect mingw . Compatibility in behavior in practice is not 100%, the lack of fork() affects the wines platform .. - NewView
  • one
    Look at posix_spawn for * nix and the _spawn family in Windows. Perhaps with minimal interface add-ins, this is exactly what you are asking. - avp

0