Results 1 to 11 of 11

Thread: Runs on Linux

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2003
    Posts
    784

    Runs on Linux

    Dear The Expert,
    Is it possible to run my executable file in Linux O/S?


    Regards
    Winan

  2. #2
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985
    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.

  3. #3
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2003
    Posts
    784
    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

  5. #5
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985
    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
    When you compile a C# program on Windows, it creates a windows executable, designed to run on Windows.

    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

  6. #6
    Hyperactive Member
    Join Date
    May 2002
    Location
    Wisconsin, USA
    Posts
    279
    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.



    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!!

    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
    Attached Images Attached Images  

  7. #7
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    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.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  8. #8
    Hyperactive Member
    Join Date
    May 2002
    Location
    Wisconsin, USA
    Posts
    279
    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

  9. #9
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    The exe format itself (PE) is only used by OS2 and Win32.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  10. #10
    Hyperactive Member
    Join Date
    May 2002
    Location
    Wisconsin, USA
    Posts
    279
    Originally posted by CornedBee
    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.

  11. #11
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    No, it's not. Never said that it was.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width