How to run an executable from within a c program?

Run c++ exe in linux

  • QUESTION: Dear Sir, I have a c++ exe file which successfully run on windows machine. Now i want to reuse the code which i have to run form linux. Is there anyway to convert exe to linux runnable format? I tried wine but itshows some error. Or is there any wayt to find the code of the exe? Thanking you, Umaimath ANSWER: There is no good way to get the source code from the executable file, and even if it could be done, it may be of no use - there might be call to the windows api (win32) functions which won't be there in linux at all. Unfortunately, wine does not run all windows programs. There are a few other good (sadly non-free) alternatives. see: http://www.computerworld.com/s/article/69849/Windows_Emulators_for_Linux_VMware_Win4Lin_Face_Off ---------- FOLLOW-UP ---------- QUESTION: Thank you very much for your reply sir. Could you please explain how to create linux executable of c++ program? It contains more than one c++ source code and header files. Thanking you, Umaimath

  • Answer:

    g++ is the "GNU C++ compiler", which is standard with linux. For the basics of hoe to compile and build programs, see: http://pages.cs.wisc.edu/~beechung/ref/gcc-intro.html If you have a large number of source files, using a Makefile is recommended. For the basics of creating and using Makefiles, see: http://linuxgazette.net/issue83/heriyanto.html

Miningco.com Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.