LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 08-01-2015, 12:30 AM   #1
sushil2993
LQ Newbie
 
Registered: Aug 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, 01:07 PM   #2
RockDoctor
Senior Member
 
Registered: Nov 2003
Location: Minnesota, US
Distribution: Fedora, Linux Mint, Ubuntu
Posts: 1,504

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

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


All times are GMT -5. The time now is 06:27 PM.

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