Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 02-27-2008, 04:57 AM   #1
LQ Newbie
Registered: Sep 2007
Posts: 7

Rep: Reputation: 0
creating binary for C code

i want to create a binary of a source code written in C.My platform is fedora core 7..I want to execute this binary on Windows platform..can u help?
Old 02-27-2008, 06:35 AM   #2
LQ 5k Club
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware & Slackware64 14.2
Posts: 7,809
Blog Entries: 58

Rep: Reputation: Disabled
Do a Google search for "Cross compiling on Linux for Windows".
Old 02-27-2008, 06:46 AM   #3
Registered: Sep 2006
Location: Nagpur, Maharashtra, India
Distribution: Debian, Ubuntu, Redhat, Fedora, SLES, OpenSUSE, FreeBSD, Mac OS X
Posts: 221

Rep: Reputation: 31

You need to compile your source code with a compiler like gcc
Syntax: #gcc -o <binary file name> <source code>
EG: #gcc -o hello.exe hello.c

P.S: Name of Binary File can be any thing. For E.G in above case it could have been simply "hello" or "hello-exe" or "hello-binary" bla bla bla....

But I am not sure whether you will be able to run the binary on Windows...


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
fstream.h is creating erratic binary programs sriram_16a SUSE / openSUSE 0 10-02-2007 01:48 AM
Creating/Distributing Linux Binary Files Sava Programming 3 08-29-2006 10:31 AM
Creating binary RPMS statically! Sunilsbjoshi Linux - Software 2 10-12-2005 01:10 AM
optcode, assembly Code, or binary? mrpc_cambodia Programming 5 01-05-2005 06:59 AM
creating a flat binary file with gcc wsimmons Programming 2 01-08-2002 12:33 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:34 AM.

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