Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

on linux

Posted on 2003-11-30
7
Medium Priority
?
443 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 14

Accepted Solution

by:
kenfcamp earned 60 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
Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

 
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

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.

Question has a verified solution.

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

In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
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…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

688 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