Re: [Vala] why valac says "error: Failed to execute child process (Exec format error)"
- From: Al Thomas <astavale yahoo co uk>
- To: oyster <lepto python gmail com>
- Cc: "vala-list gnome org" <vala-list gnome org>
- Subject: Re: [Vala] why valac says "error: Failed to execute child process (Exec format error)"
- Date: Tue, 21 Jun 2016 16:25:48 +0000 (UTC)
From: oyster <lepto python gmail com>
Sent: Tuesday, 21 June 2016, 16:53
Subject: Re: [Vala] why valac says "error: Failed to execute child process (Exec format error)"
sorry, I installed gcc/pkgconfig/gobject now
$ pacman -S mingw-w64-x86_64-gcc
$ pacman -S pkg-config
$ pacman -S mingw-w64-x86_64-gobject-introspection
gobject-introspection is a library and data for creating bindingsgobject is the package you want, I don't
know its MSYS2 name, maybe something like mingw-w64-x86_64-gobject2 or it could be glib2
$ valac ./hello.vala
Package gobject-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gobject-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gobject-2.0' found
This is a good sign and means pkg-config is now being run from within valacDoespkg-config --list-allshow the
packages you expect?You can also try following the advice in the error message.i.e. does echo
$PKG_CONFIG_PATH show the right paths?If it shows nothing then you cold try setting it before running valac
Compilation failed: 1 error(s), 0 warning(s)
error: pkg-config exited with status 1
$ pkg-config --libs --cflags gobject-2.0
-mms-bitfields -I/mingw64/include/glib-2.0
-I/mingw64/lib/glib-2.0/include -I/mingw64/include -L/mingw64/lib
-LC:/building/msys64/mingw64/lib/../lib -L/mingw64/lib
-LC:/building/msys64/mingw64/lib -L/mingw64/lib -lgobject-2.0 -lffi
-lglib-2.0 -lintl -pthread -lws2_32 -lole32 -lwinmm -lshlwapi -lpcre
-lintl -lpcre
$ valac ./hello.vala --ccode
$ gcc hello.c $(pkg-config --cflags --libs glib-2.0)
$ ./a.exe
hello
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]