-1

I am trying to compile a program that I did not write. It compiles for Ubuntu 16.04 in Ubuntu 16.04 just fine using the following commands.

qmake

make

Is there a simple way to cross compile it for Windows 32bit or 64bit via the manipulation of those commands without any changes in the programming? It is meant to be able to be compiled for windows as well. I have tried countless variations on how to do this with various libraries, all don't work, seemingly due to missing steps in the instructions (or so I'm guessing).

Edit: The program uses C++.

Edit: I am also trying to employ MXE.

Community
  • 1
  • 1

1 Answers1

0

Every program requires a runtime environment. Some languages are known to be compiled on most OS by offering a custom runtime for them. Depends on which programming language you are using. Example, Java programs just need a specific JRE for Linux or Windows to run. C#/.NET programs need Mono/Rosylyn variants (may not be fully supported for Linux).

You need to mention the language of your program to figure out the corresponding toolset for a given OS.

NitinSingh
  • 2,029
  • 1
  • 15
  • 33
  • I have added that the program uses C++ – lung bubble May 21 '18 at 06:11
  • Most C++ code is supported on Windows platform. For editing, you can use free Visual Studio Code or C++ specialized editors. – NitinSingh May 21 '18 at 06:12
  • Whether it is for this particular program or my lack of knowledge, I have found it not so accommodating in Windows. Are you saying it is excessively difficult to cross compile in Linux for Windows? – lung bubble May 21 '18 at 06:14
  • Not difficult. You can use the http://landinghub.visualstudio.com/visual-cpp-build-tools. However it depends on the way code is written and what its trying to do. In general, a code which runs successfully on Linux should run in Windows as well – NitinSingh May 21 '18 at 06:18
  • Just double checked one part of my issue; it requires leveldb be compiled for windows (if compiling in windows), but apparently that is no longer available or is so complex I have been unable to do so. I was thinking there may be a simple switch to add to qmake or make to make it cross compile for windows in ubuntu. – lung bubble May 21 '18 at 06:23