I am trying to get my machine's number of cpus in vala.
According to http://valadoc.org/#!wiki=glib-2.0/index
public uint get_num_processors ()
should return this to me.
But when I try to compile the following code:
public class Main {
static int main(string[] args) {
uint num_cpus = GLib.get_num_processors();
return 0;
}
}
with:
valac --target-glib 2.38 --pkg gtk+-3.0 --pkg gee-1.0 $(SRC)
I see the following error:
Application.vala:28.4-28.26: error: The name 'get_num_processors' does not exist in the context of 'GLib'
I've tested some other methods from GLib. They all work flawless except this one. Has anyone an idea what I'm doing wrong?