GNOME Bugzilla – Bug 685180
Vala fails to compile for Windows
Last modified: 2012-11-03 06:37:44 UTC
Created attachment 225466 [details] [review] Patch I'm cross-compiling Vala for Windows, but it is failing because of some POSIX calls not available in Windows. There are also some other problems, mostly about executable extensions. I created a patch to fix these errors. I still haven't tested it well enough, but C code generation seems to work fine. I can't test it when it directly compiles a source to an executable, I don't have a working MinGW compiler right now. I just created a dummy "cc.exe" then run my cross-compiler with the options passed by valac, and it compiled fine.
Review of attachment 225466 [details] [review]: Thanks for the patch. It looks fine with one small exception. ::: gobject-introspection/scanner.c @@ +1612,3 @@ + */ + extern __stdcall WaitForSingleObject(void*, int); + extern __stdcall GetExitCodeProcess(void*, int*); The return type is missing.
Created attachment 227783 [details] [review] Patch with return types fixed Sorry, only noticed your review today. I only copied the way GetFullPathNameA in gobject-introspection/grealpath.h is declared which doesn't have the return type. It should be "unsigned long" (DWORD) if you want to fix it. Thanks for reviewing my patch.
commit fd2b222a9ad7382bf0f802d50a9702d455195ef3 Author: Arnel A. Borja <kyoushuu@yahoo.com> Date: Sun Sep 30 18:33:56 2012 +0800 Fix build for Windows - Replace POSIX calls for spawning process with functions from Windows API when compiling for Windows - Add EXEEXT to valac and vapigen paths - Remove EXEEXT from scripts Fixes bug 685180.