Dieter Wirz <[email protected]> wrote: > On Fri, Mar 25, 2016 at 3:57 PM, Graham Haddock <[email protected]> > wrote: > > Yes. > > sudo chmod 755 myprogram > > or > > sudo chmod 755 myprogram.o > > > Graham, please do not tell fairy tails on this list! > > $ echo '#include <stdio.h>' > hello.c > $ echo 'int main (void) { printf ("Hello, world!\n"); return 0; }' >> > hello.c > $ cat hello.c > #include <stdio.h> > int main (void) { printf ("Hello, world!\n"); return 0; } > $ gcc -Wall -o hello hello.c > $ ./hello > Hello, world! > $ ls -l > total 12 > -rwxrwxr-x 1 dw dw 7332 Mar 25 16:32 hello > -rw-rw-r-- 1 dw dw 80 Mar 25 16:31 hello.c > $ > > No chmod needed, no myprogram.o there, why the sudo???? > Yes (original answerer here), I was wondering about all the corrections.
The *default* output file is a.o but if you specify with -o then you get the name you say, no .o added. I did mean to add the 'chmod +x <filename>' but got distracted, it seems that gcc is cleverer than I expected! :-) -- Chris Green ยท -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
