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 02-12-2004, 03:01 PM   #1
gazza
Member
 
Registered: Jun 2003
Distribution: Mandrake 10.1 Official
Posts: 157

Rep: Reputation: 30
gcc programming


Just trying out gcc I copied a temp' conversion program and compiled it with no errors

temp.c -o temp

and sent it to a friend to try out on their windows machine, they said it caused a "this program has performed illegal operation", so sent it to another friend and they said it ran but was unable to enter anything.

Is there something that needs to be done in program for it to run on windows machine or something ?
 
Old 02-12-2004, 03:08 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
linux executables will not run on windows.... you would need a unix later such as cygwin to run them....
 
Old 02-12-2004, 03:12 PM   #3
gazza
Member
 
Registered: Jun 2003
Distribution: Mandrake 10.1 Official
Posts: 157

Original Poster
Rep: Reputation: 30
So there is no way I could write a small C program on Linux, that would run on a windows machine ?
 
Old 02-13-2004, 02:21 AM   #4
hiteshmaisheri
Member
 
Registered: Nov 2003
Location: Kerala, India
Distribution: Red Hat, Knoppix, Mandrake, FreeBSD
Posts: 231

Rep: Reputation: 30
A program written in C will work fine.... if compiled independently on diferent operating systems... so if u want ur c program to work on different operating systems then u have to compile ur c source code indepently on the different os....
In ur case u just have to compile with a c compiler like gcc which is available on both the oses (linux & windows).... it will work fine....
 
  


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
Difference between Top Down programming & Bottom up programming minil Programming 1 06-17-2005 03:42 AM
gcc wont install, 'failed dependencies: glibc-devel is needed by gcc-3.3.3-41' TdlSnare SUSE / openSUSE 3 11-29-2004 03:13 PM
2d graphic programming in gcc pippet Programming 8 07-09-2004 06:20 AM
graphics programming with gcc mamta_k Linux - Software 1 06-01-2004 08:28 AM
gcc programming error ?? sheka&teka Linux - Newbie 2 09-18-2003 02:06 PM

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

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