Panel plugin development

Matthew Brush mbrush at codebrainz.ca
Fri Apr 5 21:47:14 CEST 2019


On 2019-04-05 12:14 p.m., Alexis BRENON @Xfce wrote:
> Hi Matthew,
> 
> Thanks for the advice. However, both autogen and configure complain
> about extra-cflags not being a valid option. I tried to set CFLAGS
> environment variable to "-Wno-error", but this is prepended to the
> list of flags, and thus does not help. Finally, I edited Makefiles
> manually to remove the "-Werror" flags and managed to compile.
> 

Ah ok, I didn't test it but I thought `--extra-cflags` was standard for 
Autotools, I guess it's not.

> Result, no more debug messages than previously ^^
>  From what I understand of your explanations, none of the DBG call
> should print something if I do not compile with full debug. However,
> in my case, some DBG call (in a first file) print something while
> others (in another file) do not print anything...
> 

One thing you could try to troubleshoot is to put the following at the 
very top, before all other code, in any files where the `DBG()` macro 
isn't working:

```
#define DEBUG 1
#include <libxfce4util/libxfce4util.h>
#ifndef DBG
# error "uh oh!"
#endif
```

Regards,
Matthew Brush


> Kind,
> Alexis BRENON.
> 
> Le ven. 5 avr. 2019 à 05:19, Matthew Brush <mbrush at codebrainz.ca> a écrit :
>>
>> On 2019-04-04 8:19 a.m., Alexis BRENON @Xfce wrote:
>>> So it's my current configuration.
>>> I will try rough printf to stderr to continue my dev, but still interested
>>> to know why this macro doesn't work...
>>>
>>
>> If you don't use `--enable-debug=full` then the `DEBUG` macro won't be
>> defined, which means the `DBG` function-like macro will do nothing[0].
>> The `--enable-debug=full` option also enables `-Werror`, which causes
>> compilation to fail because of issues in some of the code.
>>
>> You could probably configure with something like:
>>
>> ./configure --enable-debug=full --extra-cflags=-Wno-error
>>
>> To get the `DBG` macro defined and also override the `-Werror` option
>> which is causing compilation to fail on warnings.
>>
>> Regards,
>> Matthew Brush
>>
>> [0]:
>> https://git.xfce.org/xfce/libxfce4util/tree/libxfce4util/xfce-debug.h#n94
>> _______________________________________________
>> Xfce4-dev mailing list
>> Xfce4-dev at xfce.org
>> https://mail.xfce.org/mailman/listinfo/xfce4-dev
> _______________________________________________
> Xfce4-dev mailing list
> Xfce4-dev at xfce.org
> https://mail.xfce.org/mailman/listinfo/xfce4-dev
> 



More information about the Xfce4-dev mailing list