On 01/24/11 05:16 AM, walter harms wrote:
>>     The bits in [] are to provide information to the e-mail readers, letting
>>     us know which module it's for, but are removed by git when applying the
>>     patch, leaving the rest of the subject line as the single line summary of
>>     the commit that appears in the changelog and release announcement, and
>>     you don't need to preface all of those with libXt: when you are reading
>>     the libXt announcements or changelogs.
> 
> Is "add simple example" ok ? or do you need more text ?

"add simple example for XtAppNextEvent() man page" is fine for the commit
summary/subject line.

>>     Also, you shouldn't duplicate the subject line in the body of the commit
>>     message - once is enough.
>>
>>   - In the examples:
>>
>>> +#include <Xaw/Label.h>
>>> +/* gcc -I /usr/include/X11/ sample.c -o sample -lX11 -lXaw */
>>
>> That should be #include <X11/Xaw/Label.h>, and then the "-I 
>> /usr/include/X11/"
>> is not needed.  We never write code such that "-I /usr/include/X11/" is 
>> needed,
>> and shouldn't show examples that do either.
>>
> 
> I did :). Of cause it is no problem to fix but i have seens includes hidden 
> behind /usr/X11R6/
> and the idea was to hint users how to use them.

The libXt from X11R7 is unlikely to be installed in /usr/X11R6, but if it was,
we'd still recommend -I /usr/X11R6/include and #include <X11/Xaw/Label.h>
(or more precisely, we'd recommend `pkg-config --cflags xt` and letting it
provide any necessary -I flags, but those will be provided such that the
<X11/...> paths are needed).

> How do you think what is best ?
> using:
>  gcc sample.c -o sample -lX11 -lXaw
> or
>  gcc sample.c -lX11 -lXaw

The -o sample form is what I'd go with.

-- 
        -Alan Coopersmith-        [email protected]
         Oracle Solaris Platform Engineering: X Window System

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to