How to use a C file to create a Unix Executive file on Mac

2017-03-22T08:53:20

I use Sublime 3 for C programming. If I have the C file compiled in the terminal with gcc, it will generate a executable file with the .out extension. But I can't run it by double-clicking. If I compile it in Sublime, I'll get a Unix executable file. So my question is why the compiler in Sublime can create a Unix executable file but that the terminal can't?

Copyright License:
Author:「Nanton Zhang」,Reproduced under the CC 4.0 BY-SA copyright license with link to original source & disclaimer.
Link to:https://stackoverflow.com/questions/42940835/how-to-use-a-c-file-to-create-a-unix-executive-file-on-mac

About “How to use a C file to create a Unix Executive file on Mac” questions

I use Sublime 3 for C programming. If I have the C file compiled in the terminal with gcc, it will generate a executable file with the .out extension. But I can't run it by double-clicking. If I c...
I obfuscate c# executive code using dotfuscator software, and then I created a setup file using installshield. the problem is installshield doesn't use obfuscated file for creating setup file . Wor...
I have a question about an executive file. I got an executive files from another linux server,but the environment wasn't the same. It's lack of libjemalloc.so.1. What could I do to let the execut...
I have some problem with porting .tex files edited and created in mac os into unix. I have created some .tex files, my professor wants to commit something on it. I use ubuntu, he uses mac os. When he
Im trying to run a UNIX script that will automate the process of creating directories. am running the bash shell on my machine These are the steps I followed 1) Created a directory on my mac: ~/
I need to create a directory on unix machine. I think the below code will work fine on unix machine but fails while testing it on local windows machine. Where does this directory get created on my ...
On my Mac, when I try to run: sed -i 2d file.csv from the answer to Unix script to remove the first line of a CSV file, I get the following error: sed: 1: "file.csv": invalid command code f Wh...
I am working in an online server (running in windows) using a VPN. I have a mac computer and recently upgraded R and installed R-3.6.3.nn.pkg (regular) version. I am working with data frames (.c...
So I have an executable UNIX file (which I extracted from a Mac App), and tried to duplicate it. The code is: var dat = fs.readFileSync("~/FileZilla.app/Contents/MacOS/filezilla",{ flags:'r', enco...
I have an "unix executable file" named install-sh in my /Users/$USERNAME/Downloads folder which I want to execute. However if I open my terminal and execute the following commands (being in

Copyright License:Reproduced under the CC 4.0 BY-SA copyright license with link to original source & disclaimer.