LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-31-2015, 11:30 PM   #1
sushil2993
LQ Newbie
 
Registered: Jul 2015
Posts: 2

Rep: Reputation: Disabled
I have written a c program named xyz.c I able to see the preprocessor out xyz.i by u


I have written a c program named xyz.c

Iam able to see the preprocessor out xyz.i by using the command

gcc -E xyz.c>xyz.i

Iam also able to see the compiler output xyz.s by using the command
gcc -S xyz.c

Iam also able to see the Assembler output xyz.o by using the command
gcc -c xyz.c

I want to see xyz.exe after linking. So what exact command i have to give for linking to see this file
 
Old 08-01-2015, 12:07 PM   #2
RockDoctor
Senior Member
 
Registered: Nov 2003
Location: Minnesota, US
Distribution: Fedora, Linux Mint, Ubuntu
Posts: 1,560

Rep: Reputation: 341Reputation: 341Reputation: 341Reputation: 341
Are you sure you want to see xyz.exe? The normal output from gcc would be xyz
 
Old 08-01-2015, 05:33 PM   #3
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,093

Rep: Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474
Quote:
want to see xyz.exe after linking. So what exact command i have to give for linking to see this file
a .exe binary is a MICROSOFT WINDOWS program

if you want a LINUX source code to make a WINDOWS exe
then install MinGW on Windows 7 and build a Microsoft exe on windows
 
Old 08-02-2015, 01:58 PM   #4
ratt_salad
LQ Newbie
 
Registered: Jul 2015
Location: Canada
Distribution: PCLinuxOS
Posts: 14

Rep: Reputation: Disabled
Quote:
Originally Posted by sushil2993 View Post
I have written a c program named xyz.c
I want to see xyz.exe after linking. So what exact command i have to give for linking to see this file
Your question is ambiguous.
If you want the binary to be named "xzy.exe"
gcc -o xyz.exe xyz.c

If you want to explore the binary, have a look at the objdump and readelf commands after linking.
 
  


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
Possible hack, gen.xyz ? mjbradakis Linux - Security 2 06-15-2014 04:56 PM
not able to ping proxy.xyz.com vinaytp Linux - Newbie 3 07-27-2009 09:53 AM
How much memory is application XYZ using? BrianK Linux - General 3 11-03-2006 08:30 AM
Inittab - starting a single program as user XYZ via bash IK81 Linux - General 1 10-04-2006 08:00 AM
service xyz start instead of /etc/init.d/xyz start stefaandk Fedora 3 08-01-2006 08:00 PM


All times are GMT -5. The time now is 06:34 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