473,763 Members | 7,541 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

can i run linux code on windows

is there any method where i can run my linux code that is all the a.out
i made on linux to run on windows.
plz tell me the way.

Nov 15 '05 #1
21 3555
Yes you can. You have to recompile the source. Linux executables cannot
be executed in windows. Using libraries and some changes one can
recompile the source
Refer:
http://cygwin.com/

Nov 15 '05 #2
sachin dooble <sa***********@ gmail.com> wrote:
is there any method where i can run my linux code that is all the a.out
i made on linux to run on windows.
plz tell me the way.


If your 'code' is plain C and you have a compiler for Microsoft, you should
have no problems compiling the code and running it.

If all you have is the binary, you're SOL.

- Philip

--
Philip Paeps Please don't email any replies
ph****@paeps.cx I follow the newsgroup.

BOFH Excuse #130:
new management
Nov 15 '05 #3
Das

sachin dooble wrote:
is there any method where i can run my linux code that is all the a.out
i made on linux to run on windows.
plz tell me the way.

yes That is the hardest way arround. If you know how windows executes
and how linux executes then you can try to interprete the linux
executable(ELF) and make it into windows executable(PE). but there will
be issues for runtime library support, so what you will you do???

Moreover why you are interested to demote linux executables :(

Nov 15 '05 #4

sachin dooble wrote:
is there any method where i can run my linux code that is all the a.out
i made on linux to run on windows.
plz tell me the way.


Sachin, I don't think you can simply run your a.out on windows.
Assuming its a C-code all you need to do is to recompile it on windows
platform and execute it. C is not like JAVA where you can run your java
class file on any platform.

Nov 15 '05 #5
sachin dooble wrote on 02/08/05 :
is there any method where i can run my linux code that is all the a.out
i made on linux to run on windows.
plz tell me the way.


No way. BTW, this is not a C-question.

To be back to C, portability exists, but at source level. The code must
be recompiled according to the target.

--
Emmanuel
The C-FAQ: http://www.eskimo.com/~scs/C-faq/faq.html
The C-library: http://www.dinkumware.com/refxc.html

I once asked an expert COBOL programmer, how to
declare local variables in COBOL, the reply was:
"what is a local variable?"
Nov 15 '05 #6
"sachin dooble" <sa***********@ gmail.com> wrote in message
news:11******** **************@ g44g2000cwa.goo glegroups.com.. .
is there any method where i can run my linux code that is all the a.out
i made on linux to run on windows.
plz tell me the way.


This's OT. Anyway, generally, the answer is no. But if you have some spare
$$$, get VMWare or Virtual PC. If you don't have, get Bochs. Those are
virtual machines that work under windows and inside them you can install and
run any x86 OS.

Alex
Nov 15 '05 #7

sachin dooble wrote:
is there any method where i can run my linux code that is all the a.out
i made on linux to run on windows.
plz tell me the way.


You'll need something like VMWare. AFAIK, there's no way to make a
Linux executable run under Windows natively.

Nov 15 '05 #8
"John Bode" <jo*******@my-deja.com> wrote in
news:11******** *************@g 49g2000cwa.goog legroups.com:

sachin dooble wrote:
is there any method where i can run my linux code that is all the
a.out i made on linux to run on windows.
plz tell me the way.


You'll need something like VMWare. AFAIK, there's no way to make a
Linux executable run under Windows natively.

But since this is comp.lang.c, I assume you have source code in c. So
get a windows compiler and re-compile it. mingw is a nice free windows
version of gcc.
--
*** To reply by e-mail, make double u single in address ***
Nov 15 '05 #9
Ian Gay <ga*@sfuu.ca> writes:
"John Bode" <jo*******@my-deja.com> wrote in
news:11******** *************@g 49g2000cwa.goog legroups.com:

sachin dooble wrote:
is there any method where i can run my linux code that is all the
a.out i made on linux to run on windows.
plz tell me the way.


You'll need something like VMWare. AFAIK, there's no way to make a
Linux executable run under Windows natively.

But since this is comp.lang.c, I assume you have source code in c. So
get a windows compiler and re-compile it. mingw is a nice free windows
version of gcc.


But unless the source code is extremely portable, it probably won't
compile under both Windows and Linux.

--
Keith Thompson (The_Other_Keit h) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Nov 15 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
8228
by: Mike Dee | last post by:
A very very basic UTF-8 question that's driving me nuts: If I have this in the beginning of my Python script in Linux: #!/usr/bin/env python # -*- coding: UTF-8 -*- should I - or should I not - be able to use non-ASCII characters in strings and in Tk GUI button labels and GUI window titles and in raw_input data without Python returning wrong case in manipulated
383
12227
by: John Bailo | last post by:
The war of the OSes was won a long time ago. Unix has always been, and will continue to be, the Server OS in the form of Linux. Microsoft struggled mightily to win that battle -- creating a poor man's DBMS, a broken email server and various other /application/ servers to try and crack the Internet and IS markets. In the case where they didn't spend their own money to get companies to
9
1865
by: John Eric Hanson | last post by:
My company is considering a development path in which we develop code on 32 bit Windows machines to run remotely on 64 bit Linux machines. What could go wrong?
4
2702
by: John Owens | last post by:
Hi, I'm looking for a plugin for Visual Studio .NET or another IDE etc that would allow me to develop on Windows but have the compiler and debugger and code run on Linux. e.g. Code using Windows Build ( Behind the scenes: FTP updated files over to Linux and then compile
4
2234
by: Tim Golden | last post by:
Tim Golden enlightened us with: > > Well, I'm with you. I'm sure a lot of people will chime in to point > > out just how flexible and useful and productive Linux is as a > > workstation, but every time I try to use it -- and I make an honest > > effort -- I end up back in Windows > I'm curious, what do you mean with "it" in the part "every time I try > to use it"? Fair question. I have, over the years, installed and used Gentoo,
3
1750
by: A.M | last post by:
Hi, I am planning to develop python applications on windows and run them on Linux. Are ActivePython scripts compatible with Linux? Is there any guideline that explains the compatibility issues between python in different platforms?
7
11236
by: VijaKhara | last post by:
Hi, I am given source codes written using C. The writer told me that he wrote on Linux. Now I am trying to compile and run it on Windows. There are many errors shown up. Are there any configurations or any chances in the source codes I need to get done before compiling it on Windows? Thanks
4
3050
by: peter | last post by:
I've come across a weird difference between the behaviour of the Tkinter checkbox in Windows and Linux. The issue became apparent in some code I wrote to display an image in a fixed size canvas widget. If a checkbox was set then the image should be shrunk as necessary to fit the canvas while if cleared it should appear full size with scrollbars if necessary. The code worked fine under Linux (where it was developed). But under Windows,...
7
15665
by: Lior | last post by:
Hi, I have small code, that compiles on Visual C++ into a shared library (DLL). I need to compile it under linux, but the code includes some data types I'm not familiar with, such as DWORD, HANDLE, __int64, ULONG etc. What are those words?
0
9563
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9386
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
9937
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8821
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7366
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6642
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5405
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3522
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2793
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.