Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9141559
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:39:39+00:00 2026-06-17T09:39:39+00:00

I would like to compile a c++ program in cygwin (on windows) and then

  • 0

I would like to compile a c++ program in cygwin (on windows) and then run it on a Linux machine.. The reason I don’t want to just compile it on Linux is missing libraries, and a huge mess (including restricted access) to install these.

I was hoping I could just compile it, then copy the programname.exe-file to my linux folder and then run ./programname. But that doesn’t work. Is there any way to do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T09:39:39+00:00Added an answer on June 17, 2026 at 9:39 am

    Short answer is: You can’t.

    Longer answer: You can, but then you have to set up a cross-compiler that generates native Linux binaries. Or use an environment such as WINE in Linux.

    The reason you can’t just copy an executable file from Windows, even when compiled with GCC, is that the file have a specific format that is not seen as executable on Linux.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

HI, I would like to run a cygwin compiled program in visual studio using
I would like to compile my Java program in Eclipse but not to run
I would like to cross-compile a simple program for ARM architecture using the arm-linux-gcc
I would like to run a Dos program from a web server. The Dos
I would like to compile my ML program into a executable binary using mosmlc.
I would like to execute a series of commands that compile my program. But
I would like to compile a Fortran 90 (fixed format) library under Windows. However,
I would like to compile the following C program for 32- and 64-bit systems.
I would like to run a GTK+/C program line by line with some debugger.
I'm using g++ 4.4 to compile a shared library on linux. I would like

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.