Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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-12-2004, 02:01 PM   #1
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
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977
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
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
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....


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 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 > Forums > Linux Forums > Linux - Newbie

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