Pasquale Cariello Posted November 19, 2019 Share Posted November 19, 2019 Hi Everyone, I need to call gcc compiler from my server page. In windows it works while on Macos it isn't. // putenv("PATH=C:/MinGW/bin");// works on windows putenv("PATH=/user/bin");// doesn't work on macos $sourceBlock=$scriptPath.$scriptName.".".$scriptExt; $objBlock= $scriptPath.$scriptName.".o"; $exeBlock= $scriptPath.$scriptName.".exe"; //echo $sourceBlock."<br>";echo $objBlock."<br>";echo $exeBlock."<br>"; exec("gcc ".$sourceBlock." -o ".$objBlock); exec("gcc ".$sourceBlock." -o ".$exeBlock); system($exeBlock,$output); Thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now