Complete.Org: Mailing Lists: Archives: linux-help: June 2000:
[linux-help] Re: interchanging executables
Home

[linux-help] Re: interchanging executables

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: linux-help@xxxxxxxxx
Subject: [linux-help] Re: interchanging executables
From: "Wayne M. White" <WWHITE1@xxxxxxxxxxx>
Date: Fri, 16 Jun 2000 17:33:09 -0500
Reply-to: linux-help@xxxxxxxxx

I am certainly no expert, and I bet one of them will let you know for sure,
but if I understand your question it would go like this.

The program compiled under linux would not run under other OS's. You
should, however, be able to take the original source code and compile it
under, and using, another OS and it should then work under that OS.

When I was taking C++ a while back, I was working and compiling the
same code under linux and winblows both. It was all pretty simple stuff,
but the same code compiled, built and ran under both OS's just fine.

wayne

At 12:32 PM 6/16/00 , you wrote:
I had someone tell me recently that if a program is compiled correctly, it
can be run on that hardware, regardless of the operating system. Is this
true? I can understand this would be true for operating systems
themselves, but I would think that executables are being managed by an
operating system as processes, and somehow need to be able to know how
they will be controlled.

For example, assume I wrote a C program that looks for a text string
within all the files of a directory (including subdirectories), and
creates a file with the output. Let's say I compiled it on a 300 MHz
Pentium system running Debian Linux. So, assumming I compiled it in the
correct manner, I could also use that executable in OS/2, BeOS,
Windoze95/98/2000/NT, other UNIX/Linux distributions or ANY other
operating system that can run on the same hardware? If so, could it also
work on all x86 and compatible processors?

I would think that working with the different file systems would add to
the problem, unless there is a universal way executables communicate to
operating systems that they need to change into a directory or create a
file, etc.

John


-- This is the linux-help@xxxxxxxxx list.  To unsubscribe,
visit http://tmp2.complete.org/cgi-bin/listargate-aclug.cgi


-- This is the linux-help@xxxxxxxxx list.  To unsubscribe,
visit http://tmp2.complete.org/cgi-bin/listargate-aclug.cgi


[Prev in Thread] Current Thread [Next in Thread]