LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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, 02: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, 02:08 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
linux executables will not run on windows.... you would need a unix later such as cygwin to run them....
 
Old 02-12-2004, 02: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, 01: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



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

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

All times are GMT -5. The time now is 09:07 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
Open Source Consulting | Domain Registration