hello world with glib

Sonia Hamilton sonia at snowfrog.net
Tue Dec 18 03:32:35 PST 2012


Hi, I'm trying to get a "hello world" going to call a C function from
[1]glib. I'm having problems compiling, what would the correct command
line options?

% dmd -I/usr/include/glib-2.0 hello.d -L-L/usr/local/lib -L-lglib-2.0
hello.d(3): Error: undefined identifier GDateTime
hello.d(3): Error: undefined identifier GTimeZone

% cat hello.d
import std.stdio;
extern(C) GDateTime *g_date_time_new_now (GTimeZone *tz);
void main() {
  writeln("Hello, world");
  GDateTime *gdt;
}

I've got the [2]Interfacing to C page bookmarked :-)

Thanks for any help, Sonia.

References

1. http://developer.gnome.org/glib/2.34/
2. http://dlang.org/interfaceToC.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20121218/6b51b377/attachment.html>


More information about the Digitalmars-d-learn mailing list