Solved

on linux

Posted on 2003-11-30
7
418 Views
Last Modified: 2010-04-17
Why does a C program compiled on Windows not run on Linux even when they both may be running on the same type of processor ?

If a machine has both Linux and Windows, can you browse the Linux files when booted to Windows? Is the converse possible?

What is the most distinctive thing about Linux?

 In which language/languages is Linux written?

Name 2 open source databases for Linux
0
Comment
Question by:sandipmurmu
7 Comments
 
LVL 14

Accepted Solution

by:
kenfcamp earned 20 total points
ID: 9846532
a windows binary can not run under linux . Part of the reason is that the compiler for windows is using directory paths that are invalid under linux (c:/windows/system/ etc)

To use the same app under both OS's you must either compile under both (create 2 seperate binaries) or compile under linux and use an app like cgywin to run it under Windows (this may or maynot work depending on what the app is trying to do)
0
 
LVL 14

Expert Comment

by:kenfcamp
ID: 9846553
> If a machine has both Linux and Windows, can you browse the Linux files when booted to Windows? Is the converse possible?

I dont do it so I can't say for sure if you can read the linux partition under windows, but you should be able to mount the windows partition under Linux

>  In which language/languages is Linux written?

huh?? If you are asking what languages are compatible under linux  (perl, c, c+, python, and many more)

> Name 2 open source databases for Linux

http://www.google.com could have answered these questions very easily..
I'll give you one "mysql"
0
 
LVL 22

Expert Comment

by:cookre
ID: 9846880
kenfcamp - Not being able to find files is a proximate cause for failure, but I suspect this homework question is looking for the ultimate cause.

sandipmurmu - One of the reasons you're not getting many responses in this otherwise high traffic topic is that EE has a policy of not giving out homework answers.  We can help by trying to lead you in the right direction, but don't answer the questions outright.

Note that a 16-bit DOS EXE created with, say MSVC 1.52, will run under Linux.  Does that give you any ideas?

As far as what Linux is written, well, see if you can't find the source to the Linux kernel somewhere.
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 14

Expert Comment

by:kenfcamp
ID: 9847247
cookre: ahh homework, that explains alot
0
 
LVL 9

Expert Comment

by:bhagyesht
ID: 9848953
last question said it all....
"Name 2 open source databases for Linux " please no homework sandip. its not in EE's policy
0
 

Expert Comment

by:nakhab
ID: 9865571
Why does a C program compiled on Windows not run on Linux even when they both may be running on the same type of processor ?

Linux and windows are written in same processor language (Assembly) but they have introduced different memory accessing function and device control function. Both have different commands in binaries to do same job. so using a windows binary will not interpret correctly for linux and vice-versa

Hows That!

www.wigyan.com
0
 
LVL 4

Expert Comment

by:MobileOakAI
ID: 9893788
> Why does a C program compiled on Windows not run on Linux even when they both may be running on the same type of processor ?

Actually, a c program 'can' be compiled that will run on either machine, but

for FIVE questions, only 20 points each, for one who abandons questions so consistently, I think I'll pass on providing any more
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This is about my first experience with programming Arduino.
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question