Standard compilation for linux

Asked

Viewed 82 times

-4

blz galera, and the following if I compile a file in . exe I can take it to a recem windows formatted machine without anything installed and run this file, wanted to know how to do this for linux, I don’t care if I have compiled a C script,PYTHON,RUBY Emfim want to run on any machine.

  • 1

    Welcome to Stackoverflow. I believe your question is not within the scope of the site. I ask you to click on the button edit to be able to add information in order to make your question clearer,

1 answer

1

Python and Ruby are not compiled, meaning they do not generate executable files, they are interpreted by language programs, with the exception of C.

  • As long as you have the Ruby program installed on the machine the script .rb will work.
  • Python is present in several Linux distros, but of course it will not become an executable, it will still depend on something to give the "boot", maybe another executable or one .sh

I believe that the C language would be what you can compile in any environment, as long as you use the libs and Apis that are compatible between different systems, however I think you do not understand what a compiled program is and perhaps why of this confusion, recommend that first of all and before reading the rest of my answer read this very carefully:

If you have finished reading all answers then I will give you suggestions, first there are languages that guarantee to create cross-Platform applications, but this in general always depends on something, for example many say that is cross-Platform, but actually to run a program written java on a computer is required https://www.java.com/pt_BR/download/help/index_installing.xml, however there are programs that can create an "exe" (of course in the case is only for Windows) as the: http://jsmooth.sourceforge.net (last updated in 2007).

But as I said yes to other systems like Mac OSX and the various different and generally "not portable" Linux distros will have to install Java in fact.

Python as I mentioned generally see with the linux aimed at home users by default, in other cases only installing, in Windows will also be necessary to install and then scripts .py can be started, of course has the "boot" part, for example has a game called Frets On Fire which was written in Python (probably using Pygame), it is supported for Windows, Mac OSX and Linux, but of course there are still dependencies, I don’t know how Pygame works, but the process of deploy for Windows probably sends a version of Python already accompanied and has a .exe (or generates), the same does not occur other different systems may be necessary to install on the machine by itself.

Like I said maybe it would be ideal, but it’s a language that maybe doesn’t take long for you to build an application the way you want, so you could try the , but not him alone, but with a framework (I think that’s what it’s called) like the Qt, Qt has libs compatible between different systems, meaning a C++ written with Qt libs can be compiled on any system you have installed Qt, such as:

Windows, Linux/X11, Mac OSX, Embedded Linux, QNX, QNX 6.6.0 (armv7le and x86), Android, iOS, Winrt and Windows Phone 8.1.

Note that Qt Community (the "free") does not support everything, but supports many distros linux, Mac OSX and Windows, of course to compile on each system will have to download the SDK on each system and have each of the systems:

That is, with Qt you can achieve the desired result, but of course it will depend on a lot of study and practice, it will not just be to arrive and drag in the program Qtdesigner, or just because you studied a little who will arrive understanding Qt’s libs.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.