Re: Run a code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 28 Jun 2020 at 03:12, Alexandre Loures
<alexandre.loures@xxxxxxxxxxxx> wrote:
>
> Dear Team GCC,
>
> I am trying to reproduce the attached code. However, the result only
> reported the values for output, capital and consumption.
>
> That is, it does not show me the elapsed time and neither does the code
> execution appear at the prompt.
>
> However, in online compilers I can obtain these results and more the
> code execution and the elapsed time.
>
> My command for execution is as follows: gcc RBC_C.c -Wall -o RBC_C.

That's not execution, that just compiles the code to produce an
executable. That executable can then be run, or copied to somewhere
else to be run later, or sent to a colleague for them to run.

To run the executable you need to explicitly do so. Some online
compilers do that automatically, because if you're creating an
executable in an online compiler there's nothing else useful to do
with it. You either run it ... or it disappears into the cloud and is
gone (until you compile the same code again).


> Is there any other option besides -Wall and -o to show the execution of
> the command and the elapsed time?

There is no option to tell GCC to execute it. GCC is just a compiler.
To execute it, you need to do so yourself.

On Windows you would execute it by simply typing its name, i.e. RBC_C



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux