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

$ 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
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


2016-06-21 23:13 GMT+08:00 Al Thomas <astavale yahoo co uk>:




________________________________
From: oyster <lepto python gmail com>
Sent: Tuesday, 21 June 2016, 15:56
Subject: Re: [Vala] why valac says "error: Failed to execute child process
(Exec format error)"

to delete all possible things in old Msys, I run
$ export PATH=/usr/local/bin:/usr/bin:/bin:/opt/bin:/mingw64/bin

$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/opt/bin:/mingw64/bin

$ vala ./hello.vala

That should really be 'valac'. 'vala' without the 'c' will also compile to a
temporary directory and run the binary.
This adds additional complexity to your testing.


Compilation failed: 3 error(s), 0 warning(s)
error: Failed to execute child process (No such file or directory)
error: Failed to execute child process (No such file or directory)
error: Failed to execute child process (No such file or directory)

This is now a different error. The files are not being found. Have you also
installed MSYS2 gcc and pkg-config?




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]