18

Vala is a programming language with C# same syntactic, valac compiles vala program to C source code, is it possible to run my vala program on windows os?

hippietrail
  • 13,703
  • 15
  • 87
  • 133
Nasser Mansouri
  • 732
  • 2
  • 6
  • 23
  • 6
    You might end up disappointed if you expect Vala to have the exact same syntax as C#. It's similar, but not identical. – ptomato Apr 08 '12 at 11:19

2 Answers2

17

You can easily port your Vala applications on Windows by two means:

  1. Run valac on Windows by using the mingw compiler on Windows
  2. Use mingw on Linux to cross-compile the generated C source for Windows

Both work very well, but I suggest to do the second because Vala on Linux is more up-to-date than on Windows.

lethalman
  • 1,880
  • 1
  • 14
  • 17
  • tnx,can you help me to compile a vala file to win exe file using mingw? – Nasser Mansouri Apr 08 '12 at 14:18
  • 1
    First generate the C files with valac -C, after that it's all about cross-compiling a C file, it's not a matter of Vala anymore. Fetch the necessary DLLs and compile the C files with gcc-mingw. – lethalman Apr 08 '12 at 16:32
4

If you mean "does it compile on Windows?", then see the "OS" section in the infobox on the right here: http://en.wikipedia.org/wiki/Vala_(programming_language) and here are the instructions: http://live.gnome.org/Vala/ValaOnWindows

noncom
  • 4,762
  • 3
  • 34
  • 69
  • The link appears to be dead. Probably gnome.org has been reorganized. – XTL May 27 '15 at 12:56
  • @XTL yep, looks like that. However, this one is still alive: https://wiki.gnome.org/Projects/Vala/Documentation, the link is available from there, but it says the page is not yet created... – noncom May 27 '15 at 13:26