Solved

on linux

Posted on 2003-11-30
7
394 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 13

Accepted Solution

by:
kenfcamp earned 20 total points
Comment Utility
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 13

Expert Comment

by:kenfcamp
Comment Utility
> 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
Comment Utility
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 13

Expert Comment

by:kenfcamp
Comment Utility
cookre: ahh homework, that explains alot
0
 
LVL 9

Expert Comment

by:bhagyesht
Comment Utility
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
Comment Utility
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
Comment Utility
> 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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
A short article about problems I had with the new location API and permissions in Marshmallow
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

744 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now