Dear The Expert,
Is it possible to run my executable file in Linux O/S?
Regards
Winan
Printable View
Dear The Expert,
Is it possible to run my executable file in Linux O/S?
Regards
Winan
I assume you made it in C#?
Check out the mono project (google it, forgot the exact URL off hand).
You may or may not be able to compile it and run it on linux.
If you needed something to be cross-platform compatable, don't use propritary stuff, otherwise it may or may not work.
I ask this question because I have read on "Sams Teach Yourself C# in 21 Days", on page 16, it said "If you wrote a C application and you wanted to run it on Linux machine and a Windows machine, you would have to create two executable program - one on a Linux machine and one on a Windows machine. With C#, you create only one executable program, and it runs on either machine" ..
but I am not sure .. is it possible or not? because C# need CLR and .NET platform for running (pls correct me if I'm wrong), I need more clarification for this..
thanks a lot in advance
Regards
Winanjaya
When you compile a C# program on Windows, it creates a windows executable, designed to run on Windows.Quote:
Originally posted by Winanjaya
I ask this question because I have read on "Sams Teach Yourself C# in 21 Days", on page 16, it said "If you wrote a C application and you wanted to run it on Linux machine and a Windows machine, you would have to create two executable program - one on a Linux machine and one on a Windows machine. With C#, you create only one executable program, and it runs on either machine" ..
but I am not sure .. is it possible or not? because C# need CLR and .NET platform for running (pls correct me if I'm wrong), I need more clarification for this..
thanks a lot in advance
Regards
Winanjaya
I think you just interpreted it wrong. It looks like they're trying to say, you have to program 1 for Windows and 1 specific for Linux to work, where as C# you only write 1 program and it'll work on both. Even though that is a very false statement....
That or it ment you could execute Win32 executables on Linux. I never ran Mono or anything, but I'm pretty sure it doesn't create a windows executable.
Either way, that book sounds like bull****s
Actually C# is compiled into MSIL code, which is ran by the .NET Framework. Mono is an open source implentation of the .NET Framework. With Mono you will be able to run the same .NET executable on Windows, Mac, Linux, etc.
Here is a screenshot of a simple app I wrote in C#, compiled it with VS.NET, and ran it on Mono in Windows. The Windows.Forms is not complete in Mono yet, so don't experct to be running full applications just yet.
http://vbforums.com/attachment.php?s=&postid=1563464
Version 1.0 of Mono is due out in the first quarter of 2004. It will be fully supporting ASP.NET. Yes, that means you will be able to use Linux, Apache web server, and Mono to host ASP.NET Web Applications. No Windows required, and all FREE web server software!! :D
The Windows.Forms will be completed in a further release.
The idea is that you will be able to compile a .NET application on either Mono or .NET and it will run on both Mono and .NET. Eventually .NET applications wont require Windows to run.
The website for Mono is http://www.go-mono.org
Still, the current assembly linker creates a Win32-style executable file, so the mono project probably needs a kernel module (the same as Wine likely) to run those files.
Don't know about Mono's linker, it might create ELF executables.
There is nothing Win32 about .NET Exe's, except for when you specifically use Win32 API calls in your code. That is why Microsoft does not recomend the use of unmanaged code.
Currently, the Windows.Forms implementation in Mono is using Wine, but only because it is easier that rewriting it.
Go look at http://www.go-mono.org
The exe format itself (PE) is only used by OS2 and Win32.
Yes, I know that, but .NET compiles into MSIL not PE. The MSIL is not OS specific.Quote:
Originally posted by CornedBee
The exe format itself (PE) is only used by OS2 and Win32.
No, it's not. Never said that it was.