Fwd: How to find the header file and cflags about a specific function?


---------- 已转发邮件 ----------
发件人: 丁少衡 <dshbusiness gmail com>
日期: 2011年9月16日 下午6:09
主题: Re: How to find the header file and cflags about a specific function?
收件人: Hex Lee <lihe757 gmail com>

Oh, perhaps you misunderstood me. What I mean is that, I think the documents of gtk (or some other parts related to gtk library) should provide clear information about a function and its header file. But I cannot find it in gtk's documents.

Take the manpage as an example, when I want to know the details about the standard c library function, such as printf(), I type "man 3 printf" in the bash. The manpage will tell me the information about printf(). Some lines like this:
PRINTF(3)                  Linux Programmer's Manual                 PRINTF(3)

       #include <stdio.h>

       int printf(const char *format, ...);
When I see it, I will know if I want to call printf(), I must include the stdio.h header file at first. But in gtk's document, I can't find this kind of information. It does tell me some details about a function, such as gconf_client_get_default(). But it does not tell me which header file must be included in order to call it.

As your suggestion, I can search that on the web, and I really did that. But I think it is the documents' responsibility to provide full information about the API.

And, perhaps the documents has mentioned the information about the header file, but it really difficult to find that. If you know, please tell me. Thanks.


在 2011年9月16日 下午5:42,Hex Lee <lihe757 gmail com>写道:

you can google it

2011/9/16 丁少衡 <dshbusiness gmail com>:
> I hope I post on the right list.
> Now, I'm using gtk(or gnome related) libraries. Such as gconf and gsettings. But when I look up the documents, I find that the document does not tell me which header file should I include in my c source code.
> For example, when I want to call gconf_client_get_default() or g_settings_new(), I wouldn't know which header file to include, if I did not search on the web.
> Can anyone tell me how to find the information about header files in the documents? All I find in the documents says when I write a program using gtk+ function, I should include the gtk/gtk.h and use pkg-config --cflags --libs gtk+-3.0 as compile flags. But how about it when I use gsettings' or gconf's function or other function related to gnome?
> Thanks!
> dingshaoheng
> _______________________________________________
> gnome-devel-list mailing list
> gnome-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/gnome-devel-list

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