LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   I have written a c program named xyz.c I able to see the preprocessor out xyz.i by u (https://www.linuxquestions.org/questions/linux-newbie-8/i-have-written-a-c-program-named-xyz-c-i-able-to-see-the-preprocessor-out-xyz-i-by-u-4175549519/)

sushil2993 07-31-2015 11:30 PM

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

RockDoctor 08-01-2015 12:07 PM

Are you sure you want to see xyz.exe? The normal output from gcc would be xyz

John VV 08-01-2015 05:33 PM

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

ratt_salad 08-02-2015 01:58 PM

Quote:

Originally Posted by sushil2993 (Post 5399211)
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.


All times are GMT -5. The time now is 09:25 PM.