g_assertions
John Emmas
johne53@tiscali.co.uk
Mon Sep 22 15:07:00 GMT 2008
Thanks Dave, you put me on the right track.
This turned out to be a glitch with my development IDE (Code::Blocks).
g_assert() ends up calling g_log() which requires a pre-processor definition
called G_LOG_DOMAIN. In my case, G_LOG_DOMAIN needed to be a string -
namely, "glibmm" (including the quote marks).
To set this up for my gcc compiler, the IDE needs to send this:-
g++ [various options] -DG_LOG_DOMAIN=\"glibmm\"
However, that doesn't seem to work for cygwin. I need to set it up slightly
differently - namely:-
g++ [various options] -DG_LOG_DOMAIN="\"glibmm\""
So, probably not a problem with Cygwin. More likely a problem with
Code::Blocks. I probably need to flag it up to them.
Thanks again,
John
----- Original Message -----
From: "Dave Korn"
Sent: 22 September 2008 13:39
Subject: RE: g_assertions
> John Emmas wrote on 22 September 2008 13:55:
>
>> Thanks Phil,
>>
>> That sounds very plausible but I'm not sure it's right in this case.
>
> I'm pretty sure of it. The only thing that can cause that compiler error
> is
> characters between the backslash and the newline.
>
>> I
>> only have 2 copies of glib.h on my system and I'm pretty sure they came
>> with the Cygwin installation. I looked at both of them in a hex editor
>> and they seem to have Unix style line-endings.
>
> I can't make your testcase compile here. You didn't show the command
> line
> but without some kind of -I option it's not going to even find glib.h, and
> without you showing the command line we don't know which one or from
> where.
>
> The next step in investigating would be to compile it again, adding the
> "--save-temps" flag, so you get a copy of the preprocessed output in a .i
> file. Then check /that/ for EOLs of the wrong type, maybe using something
> like
>
> tail -20 *.i | od -c
>
> and looking out for "\r"s. (I chose "-20" as a guess, just to get the
> pre-processed version of my_func and skip out most of the #include headers
> and
> other irrelevancies that end up in the preprocessed output).
>
> cheers,
> DaveK
> --
> Can't think of a witty .sigline today....
>
>
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
More information about the Cygwin
mailing list