Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 447
  • Last Modified:

on linux

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
sandipmurmu
Asked:
sandipmurmu
1 Solution
 
kenfcampCommented:
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
 
kenfcampCommented:
> 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
 
cookreCommented:
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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
kenfcampCommented:
cookre: ahh homework, that explains alot
0
 
bhagyeshtCommented:
last question said it all....
"Name 2 open source databases for Linux " please no homework sandip. its not in EE's policy
0
 
nakhabCommented:
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
 
MobileOakAICommented:
> 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now