public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Kai Ruottu <kai.ruottu@wippies.com>
To: guo <gsq4everyoung@gmail.com>, gcc-help@gcc.gnu.org
Subject: Re: a problem when using gcc
Date: Wed, 13 Mar 2024 18:00:14 +0200	[thread overview]
Message-ID: <7251609f-7574-4eba-a2e5-c8d259307781@wippies.com> (raw)
In-Reply-To: <CAHT=fJFXcQt5FZu-43GD2rzac2N=TiSSceCg-a4so6swUVitpQ@mail.gmail.com>


guo via Gcc-help kirjoitti 13.3.2024 klo 16.26:
> Hello, i use a makefile to compile a .c file
What do you mean with "compile"?
> and successfully get an executable file,
Getting an executable file with GCC means "compile to assembly file", 
"compile this with 'as' to an object file" and
finally "link the object file with 'ld' to all the required library 
functions (object files), startups and endfiles".
The '-o' <executable_name' makes the assembly and link phases being done 
with the defaults.
For instance creating an excutable "hello_world" from a "hello_world.c" 
C source file :

      $ gcc -v -o hello_world hello_world.c

shows all the 3 phases because of the '-v(erbose)' switch in the command.

When you have a makefile to do the compile, you should at least know 
what it tries to do, what is the name of
the executable file it should procuce.

> but when i use command "./filename" to try to execute that
> executable file, i failed and being told "bin file not specified",could you
> please tell the reason why i get this error?Thank you for your help!

Does the run platform give this error or the executable you are running? 
Googling with this error message gives
no results...


      reply	other threads:[~2024-03-13 16:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-13 14:26 guo
2024-03-13 16:00 ` Kai Ruottu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7251609f-7574-4eba-a2e5-c8d259307781@wippies.com \
    --to=kai.ruottu@wippies.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=gsq4everyoung@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).