LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-17-2017, 06:12 AM   #16
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 6,477

Rep: Reputation: 3686Reputation: 3686Reputation: 3686Reputation: 3686Reputation: 3686Reputation: 3686Reputation: 3686Reputation: 3686Reputation: 3686Reputation: 3686Reputation: 3686

Quote:
Originally Posted by rob.rice View Post
try this "gcc -o hello hello.c"
rob.rice you are dragging this thread totally off-topic.

In the Wikipedia page you linked: ""a.out" remains the default output file name for executables created by certain compilers and linkers when no output name is specified, even though the created files actually are not in the a.out format".
In Linux, the compiler generates ELF binaries. It has done so for ages.
Explicit linking is not needed as the above examples clearly showed. The compiler does the linking for you. Try "gcc -v -o hello hello.c" instead of your own commandline (what was the point of that?) and you will see that gcc invokes its "collect2" binary which will collect all the library information and then call "ld" to link the final executable.
 
2 members found this post helpful.
Old 04-17-2017, 01:28 PM   #17
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: Slackware
Posts: 7,274

Rep: Reputation: 2674Reputation: 2674Reputation: 2674Reputation: 2674Reputation: 2674Reputation: 2674Reputation: 2674Reputation: 2674Reputation: 2674Reputation: 2674Reputation: 2674
Quote:
try this "gcc -o hello hello.c"
No, you do that, and you post the terminal output. Preferably in a new thread.

I'm not entering commands to "investigate" something that I already know is misinformation.

Last edited by dugan; 04-17-2017 at 01:49 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
GCC First Pass Error: C Compiler cannot create executables firephyz Linux From Scratch 4 01-09-2017 09:37 AM
GCC -4.0.3 isn't being compiled compiler cannot create executables. fadelhomsi Linux From Scratch 2 10-15-2007 01:47 AM
gcc cannot create executables?! nectron101 Linux - Software 4 04-23-2006 02:24 AM
gcc gives error C compiler cannot create executables ADD Linux - Newbie 6 01-03-2006 05:43 AM
./configure fails because gcc can't create executables? anachron Linux - Newbie 3 03-01-2005 11:07 PM


All times are GMT -5. The time now is 09:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration