LinuxQuestions.org
Review your favorite Linux distribution.
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 02-27-2008, 03:57 AM   #1
ravish.kanika
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, 05:35 AM   #2
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware & Slackware64 14.1
Posts: 7,453
Blog Entries: 55

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

Rep: Reputation: 31
Smile

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...
 
  


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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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