how to make windows run linux executables?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












I compiled a C++ program under linux.



make -f mymakefile


This will generate an executables a.out. It seems this executable cannot be run in the windows command prompt. Any suggestions? Thanks in advance!










share|improve this question





















  • without ever doing this id think you would have to use a cross compiler
    – Hayden Thring
    4 hours ago










  • Since it's a C++ program, why don't you consider compiling and delivering the executable on a windows machine separately?
    – Raju Devidas
    4 hours ago














up vote
1
down vote

favorite












I compiled a C++ program under linux.



make -f mymakefile


This will generate an executables a.out. It seems this executable cannot be run in the windows command prompt. Any suggestions? Thanks in advance!










share|improve this question





















  • without ever doing this id think you would have to use a cross compiler
    – Hayden Thring
    4 hours ago










  • Since it's a C++ program, why don't you consider compiling and delivering the executable on a windows machine separately?
    – Raju Devidas
    4 hours ago












up vote
1
down vote

favorite









up vote
1
down vote

favorite











I compiled a C++ program under linux.



make -f mymakefile


This will generate an executables a.out. It seems this executable cannot be run in the windows command prompt. Any suggestions? Thanks in advance!










share|improve this question













I compiled a C++ program under linux.



make -f mymakefile


This will generate an executables a.out. It seems this executable cannot be run in the windows command prompt. Any suggestions? Thanks in advance!







linux windows






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 4 hours ago









Terry Qiao

1013




1013











  • without ever doing this id think you would have to use a cross compiler
    – Hayden Thring
    4 hours ago










  • Since it's a C++ program, why don't you consider compiling and delivering the executable on a windows machine separately?
    – Raju Devidas
    4 hours ago
















  • without ever doing this id think you would have to use a cross compiler
    – Hayden Thring
    4 hours ago










  • Since it's a C++ program, why don't you consider compiling and delivering the executable on a windows machine separately?
    – Raju Devidas
    4 hours ago















without ever doing this id think you would have to use a cross compiler
– Hayden Thring
4 hours ago




without ever doing this id think you would have to use a cross compiler
– Hayden Thring
4 hours ago












Since it's a C++ program, why don't you consider compiling and delivering the executable on a windows machine separately?
– Raju Devidas
4 hours ago




Since it's a C++ program, why don't you consider compiling and delivering the executable on a windows machine separately?
– Raju Devidas
4 hours ago










1 Answer
1






active

oldest

votes

















up vote
3
down vote













You cannot natively run a program for Linux under Windows. They are completely different operating systems.



However, there are methods you can do to run the program:



  1. Recompile the program on Windows to get a native executable

  2. Install the Linux Subsystem for Windows and run the program in that environment

  3. Install Linux in a virtual machine and run the program in that environment

  4. Install Cygwin or Ming32 and recompile and run in that environment

  5. Use a cross compiler

Granted, depending on the nature of the program and it's dependencies, it might not be possible to run in another environment without modifications to the source code, or at all.






share|improve this answer






















    Your Answer







    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "3"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1361051%2fhow-to-make-windows-run-linux-executables%23new-answer', 'question_page');

    );

    Post as a guest






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    3
    down vote













    You cannot natively run a program for Linux under Windows. They are completely different operating systems.



    However, there are methods you can do to run the program:



    1. Recompile the program on Windows to get a native executable

    2. Install the Linux Subsystem for Windows and run the program in that environment

    3. Install Linux in a virtual machine and run the program in that environment

    4. Install Cygwin or Ming32 and recompile and run in that environment

    5. Use a cross compiler

    Granted, depending on the nature of the program and it's dependencies, it might not be possible to run in another environment without modifications to the source code, or at all.






    share|improve this answer


























      up vote
      3
      down vote













      You cannot natively run a program for Linux under Windows. They are completely different operating systems.



      However, there are methods you can do to run the program:



      1. Recompile the program on Windows to get a native executable

      2. Install the Linux Subsystem for Windows and run the program in that environment

      3. Install Linux in a virtual machine and run the program in that environment

      4. Install Cygwin or Ming32 and recompile and run in that environment

      5. Use a cross compiler

      Granted, depending on the nature of the program and it's dependencies, it might not be possible to run in another environment without modifications to the source code, or at all.






      share|improve this answer
























        up vote
        3
        down vote










        up vote
        3
        down vote









        You cannot natively run a program for Linux under Windows. They are completely different operating systems.



        However, there are methods you can do to run the program:



        1. Recompile the program on Windows to get a native executable

        2. Install the Linux Subsystem for Windows and run the program in that environment

        3. Install Linux in a virtual machine and run the program in that environment

        4. Install Cygwin or Ming32 and recompile and run in that environment

        5. Use a cross compiler

        Granted, depending on the nature of the program and it's dependencies, it might not be possible to run in another environment without modifications to the source code, or at all.






        share|improve this answer














        You cannot natively run a program for Linux under Windows. They are completely different operating systems.



        However, there are methods you can do to run the program:



        1. Recompile the program on Windows to get a native executable

        2. Install the Linux Subsystem for Windows and run the program in that environment

        3. Install Linux in a virtual machine and run the program in that environment

        4. Install Cygwin or Ming32 and recompile and run in that environment

        5. Use a cross compiler

        Granted, depending on the nature of the program and it's dependencies, it might not be possible to run in another environment without modifications to the source code, or at all.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited 3 hours ago

























        answered 4 hours ago









        Keltari

        46.4k16108156




        46.4k16108156



























             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1361051%2fhow-to-make-windows-run-linux-executables%23new-answer', 'question_page');

            );

            Post as a guest













































































            Comments

            Popular posts from this blog

            Long meetings (6-7 hours a day): Being “babysat” by supervisor

            Is the Concept of Multiple Fantasy Races Scientifically Flawed? [closed]

            Confectionery