[Vala] Problem using GLib's Math class



I found this really bizarre problem when compiling a simple test case:
the C file generated by Vala seems to be correct, but I keep getting
linker errors of this sort:

/tmp/cc2bjTjM.o: In function `euclid_gcd':
euclid.c:(.text+0xd4): undefined reference to `floor'
collect2: ld returned 1 exit status
error: cc exited with status 256
Compilation failed: 1 error(s), 0 warning(s)

I'm attaching two files -- test.vala is a working test case,
euclid.vala has Math.floor called from virtually the same place (in a
while-loop inside a static function), but exhibit the aforementioned
linking problem.

Thanks, and apologies in advance if it's a silly mistake on my part
(almost 2 a.m. here)

-- 
Michel

Attachment: test.vala
Description: Binary data

Attachment: euclid.vala
Description: Binary data



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